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

# XStoreCanAcquireLicenseForStoreIdResult

> XStoreCanAcquireLicenseForStoreIdResult

# XStoreCanAcquireLicenseForStoreIdResult

取得 [XStoreCanAcquireLicenseForStoreIdAsync](/zh-TW/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidasync) 呼叫的結果。

## 語法

```cpp theme={null}
HRESULT XStoreCanAcquireLicenseForStoreIdResult(  
         XAsyncBlock* async,  
         XStoreCanAcquireLicenseResult* storeCanAcquireLicense  
)  
```

### 參數

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

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

*storeCanAcquireLicense*   \_Out\_\
類型：[XStoreCanAcquireLicenseResult\*](/zh-TW/reference/system/xstore/structs/xstorecanacquirelicenseresult)

傳回時，請檢查結果的狀態，以查看使用者是否可以授權此產品。
請針對遊戲和耐久性產品 (含或不含套件) 呼叫此 API。
如果產品可以透過已插入的光碟授權，它也會傳回結果。
結果包括使用者可以授權的 SKU。
對於使用者可以透過光碟授權的內容，SKU 為 'DISC'。

### 傳回值

類型：HRESULT

成功時傳回 S\_OK；否則傳回錯誤碼。

`XStoreCanAcquireLicenseForStoreIdResult` 函式會傳回下列錯誤碼：

| 錯誤碼 | 意義 |
| - | - |
| 0x87E10BC6 `LM_E_CONTENT_NOT_IN_CATALOG` | 在目錄中找不到此產品。 |
| 0x803F8001 `LM_E_CONTENT_NOT_OWNED` | 未擁有此產品。 |
| 0x803F8008 `LM_E_PREDOWNLOAD_LICENSE_NOT_YET_AVAILABLE` | 已擁有此產品，但因為尚未發行而無法授權。 |
| 0x803F9006 `LM_E_ENTITLED_USER_SIGNED_OUT` | 產品的擁有者未登入。 |
| 0x89245305 `E_GAMESTORE_LICENSE_ACTION_THROTTLED` | 遊戲過度查詢此產品的授權，現已受到節流。限制為同一產品在 10 分鐘內最多嘗試授權 30 次。 |

## 備註

此函式會擷取 [XStoreCanAcquireLicenseForStoreIdAsync](/zh-TW/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidasync) 的執行結果，以及在執行成功時函式所要求的預覽授權。
請在 [XStoreCanAcquireLicenseForStoreIdAsync](/zh-TW/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidasync) 之後呼叫此函式，通常是在回呼函式的內容中。
如需使用範例，請參閱 [XStoreCanAcquireLicenseForStoreIdAsync](/zh-TW/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidasync)。

## 需求

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

**程式庫：** xgameruntime.lib

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

## 概念文件

* [授予玩家附加元件內容的存取權](/zh-TW/publishing/xstore-commerce/xstore-granting-access)

## 另請參閱

[XStore](/zh-TW/reference/system/xstore/xstore_members)\
[XStoreCanAcquireLicenseForStoreIdAsync](/zh-TW/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidasync)\
[如何使用不含套件的耐久性產品](/zh-TW/publishing/xstore-commerce/xstore-dwob)\
[授予玩家附加元件內容的存取權](/zh-TW/publishing/xstore-commerce/xstore-granting-access)


## Related topics

- [XStoreCanAcquireLicenseForStoreIdResult](/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidresult.md)
- [XStoreCanAcquireLicenseResult](/reference/system/xstore/structs/xstorecanacquirelicenseresult.md)
