> ## 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.

# GetHeapProperties

> Retrieves the properties of the resource heap, for placed and committed resources.

Retrieves the properties of the resource heap, for placed and committed resources.

## Syntax

```cpp theme={null}
HRESULT GetHeapProperties(
    D3D12_HEAP_PROPERTIES  pHeapProperties,
    D3D12_HEAP_FLAGS  pHeapFlags
)
```

### Parameters

*pHeapProperties \[out, optional]*<br />Type: D3D12\_HEAP\_PROPERTIES \*

Pointer to a [D3D12\_HEAP\_PROPERTIES](/reference/graphics/d3d12/structs/d3d12_heap_properties_public) structure, that on successful completion of the method will contain the resource heap properties.

*pHeapFlags \[out, optional]*<br />Type: D3D12\_HEAP\_FLAGS \*

Specifies a [D3D12\_HEAP\_FLAGS](/reference/graphics/d3d12_x/enums/d3d12_heap_flags) variable, that on successful completion of the method will contain any miscellaneous heap flags.

### Return value

Type: HRESULT

This method returns one of the [Direct3D 12 Return Codes](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/d3d12-graphics-reference-returnvalues). If the resource was created as reserved, E\_INVALIDARG is returned.

## Remarks

This method only works on placed and committed resources, not on reserved resources. If the resource was created as reserved, E\_INVALIDARG is returned. The pages could be mapped to none, one, or more heaps.

For more information, refer to [Memory Management in Direct3D 12](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/memory-management).

## 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

[ID3D12Resource](/reference/graphics/d3d12_xs/interfaces/ID3D12Resource/id3d12resource_xs)


## Related topics

- [D3D12_HEAP_TYPE](/reference/graphics/d3d12/enums/d3d12_heap_type_public.md)
- [D3D12_CPU_PAGE_PROPERTY](/reference/graphics/d3d12/enums/d3d12_cpu_page_property_public.md)
- [D3D12_FEATURE_DATA_EXISTING_HEAPS](/reference/graphics/d3d12/structs/d3d12_feature_data_existing_heaps_public.md)
- [D3D12_FEATURE_DATA_ARCHITECTURE](/reference/graphics/d3d12/structs/d3d12_feature_data_architecture_public.md)
- [D3D12_FEATURE_DATA_ARCHITECTURE1](/reference/graphics/d3d12/structs/d3d12_feature_data_architecture1_public.md)
