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

> IUnknown 派生のインターフェイスをデバイス オブジェクトに関連付け、そのインターフェイスをアプリケーション定義の GUID に関連付けます。

[IUnknown](https://learn.microsoft.com/en-us/windows/desktop/api/unknwn/nn-unknwn-iunknown) 派生のインターフェイスをデバイス オブジェクトに関連付け、そのインターフェイスをアプリケーション定義の **GUID** に関連付けます。

## 構文

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

### パラメーター

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

インターフェイスに関連付ける **GUID**。

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

デバイス オブジェクトに関連付ける [IUnknown](https://learn.microsoft.com/en-us/windows/desktop/api/unknwn/nn-unknwn-iunknown) 派生のインターフェイスへのポインター。

### 戻り値

型: HRESULT

このメソッドは、[Direct3D 12 のリターン コード](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/d3d12-graphics-reference-returnvalues) のいずれかを返します。

## 要件

**ヘッダー:** d3d12\_xs.h または d3d12\_x.h\
**ライブラリ:** d3d12\_xs.lib または d3d12\_x.lib\
**サポートされているプラットフォーム**: XBOX Series 本体および XBOX One ファミリ

## 関連項目

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


## Related topics

- [GetPrivateData](/ja-jp/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_getprivatedata_public.md)
- [CreatePipelineLibrary](/ja-jp/reference/graphics/d3d12/interfaces/id3d12device1/methods/id3d12device1_createpipelinelibrary_public.md)
- [SetPrivateData](/ja-jp/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_setprivatedata_public.md)
- [SetName](/ja-jp/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_setname_public.md)
- [PFUserDataPermission](/ja-jp/services/playfab/api-references/c/pftypes/enums/pfuserdatapermission.md)
