> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SetResidencyPriority

> This method sets residency priorities of a specified list of objects.

This method sets residency priorities of a specified list of objects.

## Syntax

```cpp theme={null}
HRESULT SetResidencyPriority(
    UINT NumObjects,
    ID3D12Pageable const  ppObjects,
    const D3D12_RESIDENCY_PRIORITY  pPriorities
)
```

### Parameters

*NumObjects*\
Type: UINT

Specifies the number of objects in the *ppObjects* and *pPriorities* arrays.

*ppObjects \[in]*\
Type: ID3D12Pageable \*const \*

Specifies an array, of length *NumObjects*, containing references to [ID3D12Pageable](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12pageable/id3d12pageable_public.md) objects.

*pPriorities \[in]*\
Type: const D3D12\_RESIDENCY\_PRIORITY \*

Specifies an array, of length *NumObjects*, of [D3D12\_RESIDENCY\_PRIORITY](https://docs.xbox.com/reference/graphics/d3d12/enums/d3d12_residency_priority_public.md) values for the list of objects.

### Return value

Type: HRESULT

This method returns an HRESULT success or error code.

## Remarks

For more information, refer to [Residency](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/residency).

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12Device1](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12device1/id3d12device1_public.md)


## Related topics

- [D3D12_RESIDENCY_PRIORITY](https://docs.xbox.com/reference/graphics/d3d12/enums/d3d12_residency_priority_public.md)
- [DSTORAGE_PRIORITY](https://docs.xbox.com/reference/system/dstorage/enums/dstorage_priority.md)
- [D3D12_RESIDENCY_FLAGS](https://docs.xbox.com/reference/graphics/d3d12/enums/d3d12_residency_flags_public.md)
- [XAppCaptureMetadataPriority](https://docs.xbox.com/reference/system/xappcapture/enums/xappcapturemetadatapriority.md)
- [D3D12_COMMAND_QUEUE_DESC](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_command_queue_desc_public.md)
