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

# SetPrivateDataInterface

> Associates an IUnknown-derived interface with the device object and associates that interface with an application-defined GUID.

Associates an [IUnknown](https://learn.microsoft.com/en-us/windows/desktop/api/unknwn/nn-unknwn-iunknown)-derived interface with the device object and associates that interface with an application-defined **GUID**.

## Syntax

```cpp theme={null}
HRESULT SetPrivateDataInterface(
    const GUID & guid,
    const IUnknown  pData
)
```

### Parameters

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

The **GUID** to associate with the interface.

*pData \[in, optional]*\
Type: const IUnknown \*

A pointer to the [IUnknown](https://learn.microsoft.com/en-us/windows/desktop/api/unknwn/nn-unknwn-iunknown)-derived interface to be associated with the device object.

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

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

- [GetPrivateData](/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_getprivatedata_public.md)
- [CreatePipelineLibrary](/reference/graphics/d3d12/interfaces/id3d12device1/methods/id3d12device1_createpipelinelibrary_public.md)
- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [SetPrivateData](/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_setprivatedata_public.md)
- [SetName](/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_setname_public.md)
