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

# GetWindowAssociation (XBOX Series 主機)

> 取得使用者用來控制切換進入及離開全螢幕的視窗。

取得使用者用來控制切換進入及離開全螢幕的視窗。

## 語法

```cpp theme={null}
HRESULT GetWindowAssociation(  
         HWND* pWindowHandle  
)  
```

### 參數

*pWindowHandle*   \_Out\_\
類型：HWND\*

視窗控制代碼的指標。

### 傳回值

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

## 另請參閱

[IDXGIFactory](/zh-TW/reference/graphics/d3d12_xs/interfaces/IDXGIFactory/idxgifactory)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [XBOX Series X|S 總覽](/zh-TW/paths/series-xs/overview.md)
- [Play Anywhere(主機 + PC)總覽](/zh-TW/paths/play-anywhere/overview.md)
- [XBOX 遊戲開發文件](/zh-TW/index.md)
- [XBOX 主機遊戲的認證測試 XBOX 需求](/zh-TW/publishing/certification/console-cert-tested-requirements.md)
