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

# パッケージのない耐久型の使用方法

> タイトルでパッケージのない耐久型 (DWOB) を使用します — ライセンス供与のセットアップ、エンタイトルメント チェック、およびパッケージ化されたダウンロード可能コンテンツ製品との違い。

耐久型は、クライアントにダウンロードされるパッケージの有無で構成できます。パッケージのない耐久型は、構成と使用がより簡単です。この種の耐久型は通常、既にベース ゲームの一部であるコンテンツへのアクセスを制限するために使用します。多くのゲームは、ライセンスがない場合でもマルチプレイヤーやプレビュー用にアセットを使用するため、アドオンのコンテンツをベース ゲーム パッケージに含めることを選択します。

<Note>
  パッケージのない耐久型はディスクではサポートされていません。
</Note>

ダウンロード可能なパッケージがなくても、この製品タイプは[ゲームの製品共有モデル](/publishing/xstore-commerce/xstore-product-sharing)に従ってライセンスを提供します。

[XStoreQueryEntitledProductsAsync](/reference/system/xstore/xstore_members) を使用して所有権を確認するだけでは十分ではありません。代わりに、[XStoreAcquireLicenseForDurablesAsync](/reference/system/xstore/xstore_members) を使用して耐久型へのアクセスを適切に確認します。

```cpp theme={null}
void AcquireLicenseForDurable(const char* storeId)
{
    auto async = new XAsyncBlock{};
    async->queue = m_asyncQueue;
    async->callback = [](XAsyncBlock* async)
    {
        XStoreLicenseHandle result = {};

        HRESULT hr = XStoreAcquireLicenseForDurablesResult(
            async,
            &result);

        if (SUCCEEDED(hr))
        {
            bool isValid = XStoreIsLicenseValid(result);
            printf("Is valid license: %s\n", isValid? "yes" : "no");
        }
        else
        {
            printf("Error calling XStoreAcquireLicenseForDurablesResult: 0x%x\n", hr);
        }

        delete async;
    };

    HRESULT hr = XStoreAcquireLicenseForDurablesAsync(
        m_xStoreContext,
        storeId,
        async);

    if (FAILED(hr))
    {
        delete async;
        return;
    }
}
```

## リファレンス API ドキュメント

* [XStore (API の内容)](/reference/system/xstore/xstore_members)
  * 関数
    * [XStoreQueryEntitledProductsAsync](/reference/system/xstore/xstore_members)
    * [XStoreAcquireLicenseForDurablesAsync](/reference/system/xstore/xstore_members)

## 関連項目

[コマースの概要](/publishing/xstore-commerce/xstore-commerce-overview)

[ダウンロード可能なコンテンツ (DLC) の管理とライセンス供与](/publishing/xstore-commerce/xstore-dlc)

[XStore API リファレンス](/reference/system/xstore/xstore_members)


## Related topics

- [ダウンロード可能なコンテンツ (DLC) の管理とライセンス供与](/ja-jp/publishing/xstore-commerce/xstore-dlc.md)
- [基本的な Store 操作](/ja-jp/publishing/xstore-commerce/xstore-basic-operations.md)
- [適切な製品タイプを選択する](/ja-jp/publishing/xstore-commerce/xstore-choosing-product-type.md)
- [GDK コマース システムの概要](/ja-jp/publishing/xstore-commerce/xstore-overview.md)
- [ライセンス供与テストの有効化](/ja-jp/publishing/xstore-commerce/xstore-licensing-setup.md)
