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

# XGEnterExclusiveLock (XBOX One 系列)

> 進入獨佔鎖定，用來同步處理 XGSetHardwareVersion 的呼叫與 XG 紋理計算器的建立。

進入獨佔鎖定，用來同步處理 XGSetHardwareVersion 的呼叫與 XG 紋理計算器的建立。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
BOOL XGEnterExclusiveLock(  
)  
```

<a id="ID4EO" />

### 傳回值

類型：BOOL

如果已取得鎖定，則為 **true**；如果未取得鎖定或已停用獨佔鎖定，則為 **false**。

<a id="remarks" />

## 備註

使用 **XGEnterExclusiveLock** 和 [XGLeaveExclusiveLock](/zh-TW/reference/graphics/xg__NR/functions/xgleaveexclusivelock) API 手動取得和釋放 XG 關鍵區段。如果已停用獨佔鎖定，這些 API 沒有作用，且 XGEnterExclusiveLock 會傳回 **false**。

<a id="requirements" />

## 需求

**標頭：** xg.h

**程式庫：** xg\_x.lib

**支援的平台：** XBOX One 系列

## 另請參閱

[XG 參考](/zh-TW/reference/graphics/xg__NR/xg_members)\
[XGEnableExclusiveLocking](/zh-TW/reference/graphics/xg__NR/functions/xgenableexclusivelocking)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [XBOX One 與 XBOX Series X|S GDK 工具](/zh-TW/tools/tools-console/tools-sdk.md)
- [XBOX 遊戲開發文件](/zh-TW/index.md)
- [跨世代遊戲開發](/zh-TW/build/console-features/cross-gen/gc-cross-gen-toc.md)
- [套件 (傳統體驗)](/zh-TW/publishing/game-publishing/concepts/packages-overview.md)
