> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XStoreCloseContextHandle

> XStoreCloseContextHandle

# XStoreCloseContextHandle

關閉指定的市集內容控制代碼。

## 語法

```cpp theme={null}
void XStoreCloseContextHandle(  
         XStoreContextHandle storeContextHandle  
)  
```

### 參數

*storeContextHandle*   \_In\_\
類型：XStoreContextHandle

要關閉的控制代碼。

### 傳回值

類型：void

## 備註

在時間敏感執行緒上呼叫此函式是安全的。

此函式會關閉由 [XStoreCreateContext](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstorecreatecontext.md) 建立的 **XStoreContextHandle**。未使用此函式關閉的市集內容控制代碼會導致記憶體流失。最好在清除期間呼叫此函式，以關閉所有剩餘的 **XStoreConextHandles**。如需使用範例，請參閱 [XStoreCreateContext](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstorecreatecontext.md)。

## 需求

**標頭：** XStore.h (包含在 XGameRuntime.h 中)

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 概念文件

* [時間敏感執行緒](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 另請參閱

[XStore](https://docs.xbox.com/zh-TW/reference/system/xstore/xstore_members.md)\
[XStoreCreateContext](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstorecreatecontext.md)


## Related topics

- [XStoreCreateContext](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstorecreatecontext.md)
- [在 Unity 專案中使用 GDK API 的 C# 包裝函式](https://docs.xbox.com/zh-TW/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreCloseLicenseHandle](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstorecloselicensehandle.md)
- [XblContextCloseHandle](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/xbox_live_context_c/functions/xblcontextclosehandle.md)
- [XStoreCloseProductsQueryHandle](https://docs.xbox.com/zh-TW/reference/system/xstore/functions/xstorecloseproductsqueryhandle.md)
