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

# XGTerminateLibrary (XBOX Series 主機)

> 解除配置 XG_XS 內的全域狀態。

解除配置 XG\_XS 內的全域狀態。

## 語法

```cpp theme={null}
HRESULT XGTerminateLibrary(  
)  
```

### 參數

### 傳回值

類型：HRESULT

成功時傳回 S\_OK。如果 XG\_XS 已終止，XGTerminateLibrary 會傳回 S\_FALSE。

## 備註

可以安全地多次呼叫 XGTerminateLibrary；如果 XG\_XS 已終止，XGTerminateLibrary 會傳回 S\_FALSE，而不是 S\_OK。
XGTerminateLibrary 不是安全執行緒；請確保不會與任何其他 XG API 同時呼叫它。
呼叫 XGTerminateLibrary 之後，可以透過呼叫 XGInitializeLibrary，或透過其他 XG API 隱含地重新初始化 XG\_XS。

## 需求

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

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

**支援的平台**：XBOX Series X|S

## 另請參閱

[xg\_xs](/zh-TW/reference/graphics/xg_xs/xg_xs_members)


## Related topics

- [XTaskQueueTerminate](/reference/system/xtaskqueue/functions/xtaskqueueterminate.md)
- [XTaskQueueTerminatedCallback](/reference/system/xtaskqueue/functions/xtaskqueueterminatedcallback.md)
- [XBOX Series X|S 總覽](/zh-TW/paths/series-xs/overview.md)
- [XBOX 主機遊戲的認證測試 XBOX 需求](/zh-TW/publishing/certification/console-cert-tested-requirements.md)
- [IXtfApplicationClient::Terminate](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/terminate-ixtfapplicationclient-xtfapplication-xbox-microsoft-m.md)
