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

# XStoreGetUserPurchaseIdResultSize

> XStoreGetUserPurchaseIdResultSize

# XStoreGetUserPurchaseIdResultSize

取得 [XStoreGetUserPurchaseIdResult](/zh-TW/reference/system/xstore/functions/xstoregetuserpurchaseidresult) 所傳回之結果的大小。

## 語法

```cpp theme={null}
HRESULT XStoreGetUserPurchaseIdResultSize(  
         XAsyncBlock* async,  
         size_t* size  
)  
```

### 參數

*async*   \_In\_\
類型：[XAsyncBlock\*](/zh-TW/reference/system/xasync/structs/xasyncblock)

傳遞給 [XStoreGetUserPurchaseIdAsync](/zh-TW/reference/system/xstore/functions/xstoregetuserpurchaseidasync) 的 XAsyncBlock。[XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock) 可用來輪詢呼叫的狀態並擷取呼叫結果。如需詳細資訊，請參閱 [XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock)。

*size*   \_Out\_\
類型：size\_t\*

成功時，傳回 [XStoreGetUserPurchaseIdResult](/zh-TW/reference/system/xstore/functions/xstoregetuserpurchaseidresult) 將傳回之結果的大小。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

此結果函式可讓您擷取呼叫 [XStoreGetUserPurchaseIdResult](/zh-TW/reference/system/xstore/functions/xstoregetuserpurchaseidresult) 時的購買識別碼大小。因此，應在呼叫 [XStoreGetUserPurchaseIdResult](/zh-TW/reference/system/xstore/functions/xstoregetuserpurchaseidresult) 之後呼叫此函式，通常是在回呼函式的內容中。如需使用範例，請參閱 [XStoreGetUserPurchaseIdAsync](/zh-TW/reference/system/xstore/functions/xstoregetuserpurchaseidasync)。

## 需求

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

**程式庫：** xgameruntime.lib

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

## 另請參閱

[XStore](/zh-TW/reference/system/xstore/xstore_members)\
[XStoreGetUserPurchaseIdAsync](/zh-TW/reference/system/xstore/functions/xstoregetuserpurchaseidasync)\
[XStoreGetUserPurchaseIdResult](/zh-TW/reference/system/xstore/functions/xstoregetuserpurchaseidresult)


## Related topics

- [XStoreGetUserPurchaseIdResultSize](/reference/system/xstore/functions/xstoregetuserpurchaseidresultsize.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [XStoreGetUserPurchaseIdResult](/reference/system/xstore/functions/xstoregetuserpurchaseidresult.md)
