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

# GetPrivateData

> Gets application-defined data from a device object.

Gets application-defined data from a device object.

## Syntax

```cpp theme={null}
HRESULT GetPrivateData(
    const GUID & guid,
    UINT  pDataSize,
    void  pData
)
```

### Parameters

*guid \[in]*\
Type: const GUID &

The **GUID** that is associated with the data.

*pDataSize \[in, out]*\
Type: UINT \*

A pointer to a variable that on input contains the size, in bytes, of the buffer that <i>pData</i> points to, and on output contains the size, in bytes, of the amount of data that **GetPrivateData** retrieved.

*pData \[out, optional]*\
Type: void \*

A pointer to a memory block that receives the data from the device object if <i>pDataSize</i> points to a value that specifies a buffer large enough to hold the data.

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

## Remarks

If the data returned is a pointer to an [IUnknown](https://learn.microsoft.com/en-us/windows/desktop/api/unknwn/nn-unknwn-iunknown), or one of its derivative classes, which was previously set by SetPrivateDataInterface, that interface will have its reference count incremented before the private data is returned.

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

[ID3D12Object](/reference/graphics/d3d12_xs/interfaces/ID3D12Object/id3d12object)


## Related topics

- [SetName](/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_setname_public.md)
- [SetPrivateData](/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_setprivatedata_public.md)
- [SetPrivateDataInterface](/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_setprivatedatainterface_public.md)
- [How to get internal player data](/services/playfab/player-progression/player-data/how-to-get-internal-player-data.md)
- [PFUserPrivateAccountInfo](/services/playfab/api-references/c/pftypes/structs/pfuserprivateaccountinfo.md)
