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

# D3D12GetInterface (XBOX Series 主機)

> 當系統處於 Windows 開發人員模式時，在執行階段選取 SDK 版本。

當系統處於 Windows 開發人員模式時，在執行階段選取 SDK 版本。支援偵錯、工具、[DRED](https://learn.microsoft.com/en-us/windows/win32/direct3d12/use-dred) 及 SDK 設定介面。

## 語法

```cpp theme={null}
HRESULT D3D12GetInterface(
    const IID & rclsid,
    const IID & riid,
    void  ppvDebug
)
```

### 參數

*rclsid*\
類型：const IID &

與將用來建立物件之資料和程式碼相關聯的 CLSID。

已定義下列 CLSID。

* DEFINE\_GUID(CLSID\_D3D12Debug,                        0xf2352aeb, 0xdd84, 0x49fe, 0xb9, 0x7b, 0xa9, 0xdc, 0xfd, 0xcc, 0x1b, 0x4f);
* DEFINE\_GUID(CLSID\_D3D12Tools,                        0xe38216b1, 0x3c8c, 0x4833, 0xaa, 0x09, 0x0a, 0x06, 0xb6, 0x5d, 0x96, 0xc8);
* DEFINE\_GUID(CLSID\_D3D12DeviceRemovedExtendedData,    0x4a75bbc4, 0x9ff4, 0x4ad8, 0x9f, 0x18, 0xab, 0xae, 0x84, 0xdc, 0x5f, 0xf2);
* DEFINE\_GUID(CLSID\_D3D12SDKConfiguration,             0x7cda6aca, 0xa03e, 0x49c8, 0x94, 0x58, 0x03, 0x34, 0xd2, 0x0e, 0x07, 0xce);

它們分別對應至下列介面。

* [ID3D12Debug 介面](https://learn.microsoft.com/en-us/windows/win32/api/d3d12sdklayers/nn-d3d12sdklayers-id3d12debug)
* [ID3D12Tools 介面](/zh-TW/reference/graphics/d3d12/interfaces/id3d12tools/id3d12tools_public)
* [ID3D12DeviceRemovedExtendedDataSettings 介面](/zh-TW/reference/graphics/d3d12/interfaces/id3d12deviceremovedextendeddatasettings/id3d12deviceremovedextendeddatasettings_public)
* [ID3D12SDKConfiguration 介面](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nn-d3d12-id3d12sdkconfiguration)

*riid*\
類型：const IID &

SDK 設定介面的全域唯一識別碼 (**GUID**)。介面的 **REFIID** (或 **GUID**) 可以使用 `__uuidof` 巨集取得。例如，`__uuidof(ID3D12SDKConfiguration)` 會擷取偵錯介面的 **GUID**。

*ppvDebug*\
類型：void \*\*

`out` 參數，傳回時包含所要求的介面 (例如 SDK 設定介面)，以指向 void 指標的指標表示。請參閱 [ID3D12SDKConfiguration 介面](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nn-d3d12-id3d12sdkconfiguration)。

### 傳回值

類型：HRESULT

如果函式成功，則傳回 **S\_OK**。否則，會傳回其中一個 [Direct3D 12 傳回碼](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues)。

## 備註

## 需求

**標頭：** d3d12\_xs.h\
**程式庫：** d3d12\_xs.lib\
**支援的平台**：XBOX Series 主機

## 另請參閱

* [ID3D12Debug](https://learn.microsoft.com/en-us/windows/win32/api/d3d12sdklayers/nn-d3d12sdklayers-id3d12debug)
* [ID3D12Tools](/zh-TW/reference/graphics/d3d12/interfaces/id3d12tools/id3d12tools_public)
* [ID3D12DeviceRemovedExtendedDataSettings](/zh-TW/reference/graphics/d3d12/interfaces/id3d12deviceremovedextendeddatasettings/id3d12deviceremovedextendeddatasettings_public)
* [ID3D12SDKConfiguration 介面](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nn-d3d12-id3d12sdkconfiguration)


## Related topics

- [ID3D12Device10 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device10/id3d12device10_public.md)
- [ID3D12Device5 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device5/id3d12device5_public.md)
- [ID3D12Device9 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device9/id3d12device9_public.md)
- [ID3D12GraphicsCommandList7 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist7/id3d12graphicscommandlist7_public.md)
- [D3D12GetDebugInterface](/zh-TW/reference/graphics/d3d12/functions/d3d12getdebuginterface_public.md)
