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

# StoreValue

> エントリをキャッシュに追加します。

エントリをキャッシュに追加します。

## 構文

```cpp theme={null}
HRESULT StoreValue(
    const void  pKey,
    UINT KeySize,
    const void  pValue,
    UINT ValueSize
)
```

### パラメーター

*pKey*\
型: const void \*

追加するエントリのキー。

*KeySize*\
型: UINT

キーのサイズ (バイト単位)。

*pValue*\
型: const void \*

追加するエントリを含むメモリ ブロックへのポインター。

*ValueSize*\
型: UINT

追加するエントリのサイズ (バイト単位)。

### 戻り値

型: HRESULT

関数が成功した場合、**S\_OK** を返します。それ以外の場合は、[**HRESULT**](https://learn.microsoft.com/en-us/windows/desktop/com/structure-of-com-error-codes) [エラー コード](https://learn.microsoft.com/en-us/windows/win32/com/com-error-codes-10) を返します。

| 戻り値                                 | 説明                                     |
| ----------------------------------- | -------------------------------------- |
| DXGI\_ERROR\_ALREADY\_EXISTS        | 同じキーを持つエントリが存在します。                     |
| DXGI\_ERROR\_CACHE\_HASH\_COLLISION | 指定されたキーと同じハッシュを持つエントリがありますが、キーが一致しません。 |
| DXGI\_ERROR\_CACHE\_FULL            | このエントリを追加すると、キャッシュが最大サイズを超えてしまいます。     |

## 解説

## 要件

**ヘッダー:** d3d12\_xs.h または d3d12\_x.h\
**ライブラリ:** d3d12\_xs.lib または d3d12\_x.lib\
**サポートされるプラットフォーム**: XBOX Series 本体および XBOX One ファミリ

## 関連項目

* [D3D12 シェーダー キャッシュ API](https://microsoft.github.io/DirectX-Specs/d3d/ShaderCache.html)


## Related topics

- [XStoreCanAcquireLicenseForStoreIdResult](/ja-jp/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidresult.md)
- [XStoreCanAcquireLicenseForStoreIdAsync](/ja-jp/reference/system/xstore/functions/xstorecanacquirelicenseforstoreidasync.md)
- [XStoreShowGiftingUIAsync](/ja-jp/reference/system/xstore/functions/xstoreshowgiftinguiasync.md)
- [XStoreShowGiftingUIResult](/ja-jp/reference/system/xstore/functions/xstoreshowgiftinguiresult.md)
- [XStoreShowPurchaseUIAsync](/ja-jp/reference/system/xstore/functions/xstoreshowpurchaseuiasync.md)
