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

# 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]*\
Type: D3D12\_HEAP\_PROPERTIES \*

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

*pHeapFlags \[out, optional]*\
Type: D3D12\_HEAP\_FLAGS \*

Specifies a [D3D12\_HEAP\_FLAGS](https://docs.xbox.com/reference/graphics/d3d12_x/enums/d3d12_heap_flags.md) 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\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12Resource](https://docs.xbox.com/reference/graphics/d3d12_xs/interfaces/ID3D12Resource/id3d12resource_xs.md)


## Related topics

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