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

# XStoreCloseContextHandle

> XStoreCloseContextHandle

# XStoreCloseContextHandle

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

## 語法

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

### 參數

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

要關閉的控制代碼。

### 傳回值

類型：void

## 備註

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

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

## 需求

**標頭：** 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](/zh-TW/reference/system/xstore/xstore_members)\
[XStoreCreateContext](/zh-TW/reference/system/xstore/functions/xstorecreatecontext)


## Related topics

- [XStoreCloseContextHandle](/es/reference/system/xstore/functions/xstoreclosecontexthandle.md)
- [XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [XStoreCloseLicenseHandle](/reference/system/xstore/functions/xstorecloselicensehandle.md)
- [XStoreCloseProductsQueryHandle](/reference/system/xstore/functions/xstorecloseproductsqueryhandle.md)
