> ## 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 (XBOX Series 主機)

> 在物件的私用資料中設定介面。

在物件的私用資料中設定介面。

## 語法

```cpp theme={null}
HRESULT SetPrivateDataInterface(  
         REFGUID Name,  
         const IUnknown* pUnknown  
)  
```

### 參數

*Name*   \_In\_<br />類型：[REFGUID](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-oaut/6e7d7108-c213-40bc-8294-ac13fe68fd50)

識別介面的 GUID。

*pUnknown*   \_In\_<br />類型：[IUnknown](https://learn.microsoft.com/en-us/windows/desktop/api/unknwn/nn-unknwn-iunknown)\*

要設定的介面。

### 傳回值

類型：HRESULT

如果成功，會傳回 S\_OK；否則會傳回錯誤碼。如需錯誤碼清單，請參閱 [Direct3D 12 傳回碼](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues)。

## 需求

**標頭：** d3d12\_xs.h

**程式庫：** d3d12\_xs.lib<br />**支援的平台：** XBOX Series 主機

## 另請參閱

[IDXGIObject](/zh-TW/reference/graphics/d3d12_xs/interfaces/IDXGIObject/idxgiobject)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [SetPrivateDataInterface](/zh-TW/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_setprivatedatainterface_public.md)
- [SetPrivateData](/zh-TW/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_setprivatedata_public.md)
- [GetPrivateData](/zh-TW/reference/graphics/d3d12/interfaces/id3d12object/methods/id3d12object_getprivatedata_public.md)
- [RSSetShadingRateImage (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist5/methods/id3d12graphicscommandlist5_rssetshadingrateimage_public.md)
