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

# GetAdapter (XBOX Series 主機)

> 傳回指定裝置的配接器。

傳回指定裝置的配接器。

## 語法

```cpp theme={null}
HRESULT GetAdapter(  
         IDXGIAdapter** pAdapter  
)  
```

### 參數

*pAdapter*   \_Out\_\
類型：IDXGIAdapter\*\*

指向配接器之 [IDXGIAdapter](/zh-TW/reference/graphics/d3d12_xs/interfaces/IDXGIAdapter/idxgiadapter) 介面指標的位址。此參數不得為 **NULL**。

### 傳回值

類型：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 主機

## 另請參閱

[IDXGIDevice](/zh-TW/reference/graphics/d3d12_xs/interfaces/IDXGIDevice/idxgidevice)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [DXGI_ADAPTER_DESC2 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12_xs/structs/dxgi_adapter_desc2.md)
- [GetShaderIdentifier (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getshaderidentifier_public.md)
- [GetPipelineStackSize (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getpipelinestacksize_public.md)
- [GetResourceAllocationInfo1 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_getresourceallocationinfo1_public.md)
