> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.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*<br />Type: UINT

Specifies the number of objects in the <i>ppObjects</i> and <i>pPriorities</i> arrays.

*ppObjects \[in]*<br />Type: ID3D12Pageable \*const \*

Specifies an array, of length <i>NumObjects</i>, containing references to [ID3D12Pageable](/reference/graphics/d3d12/interfaces/id3d12pageable/id3d12pageable_public) objects.

*pPriorities \[in]*<br />Type: const D3D12\_RESIDENCY\_PRIORITY \*

Specifies an array, of length <i>NumObjects</i>, of [D3D12\_RESIDENCY\_PRIORITY](/reference/graphics/d3d12/enums/d3d12_residency_priority_public) 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<br />**Library:** d3d12\_xs.lib or d3d12\_x.lib<br />**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12Device1](/reference/graphics/d3d12/interfaces/id3d12device1/id3d12device1_public)


## Related topics

- [D3D12_RESIDENCY_PRIORITY](/reference/graphics/d3d12/enums/d3d12_residency_priority_public.md)
- [DSTORAGE_PRIORITY](/reference/system/dstorage/enums/dstorage_priority.md)
- [D3D12_RESIDENCY_FLAGS](/reference/graphics/d3d12/enums/d3d12_residency_flags_public.md)
- [XAppCaptureMetadataPriority](/reference/system/xappcapture/enums/xappcapturemetadatapriority.md)
- [DSTORAGE_PRIORITY_STATS](/reference/system/dstorage/structs/dstorage_priority_stats.md)
