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

# Initialize

> セーブ ゲーム ラッパーを初期化し、指定したユーザーのすべてのコンテナーを同期します。

# Microsoft.Xbox.Wrappers.XGameSave.Provider.Initialize

セーブ ゲーム ラッパーを初期化し、指定したユーザーのすべてのコンテナーを同期します。

<a id="syntaxSection" />

## 構文

```cpp theme={null}
HRESULT Initialize(XUserHandle userHandle,
                   const std::string& serviceConfigurationId);
```

<a id="parametersSection" />

### パラメーター

*userHandle*   \_In\_<br />型: XUserHandle

XBOX Live ユーザー アカウントへのハンドル。

*serviceConfigurationId*  \_In\_<br />型: std::string

ゲームの Service Configuration ID (SCID)。

<a id="retvalSection" />

### 戻り値

型: HRESULT

このメソッドは成功時に **S\_OK** を返し、失敗時は次の HRESULT コードを返します。

* **E\_GS\_USER\_CANCELED**
* **E\_GS\_USER\_NOT\_REGISTERED\_IN\_SERVICE**
* **E\_GS\_NO\_ACCESS**
* **E\_GS\_NO\_SERVICE\_CONFIGURATION**

<a id="remarksSection" />

## 解説

`Provider` クラスの他のメソッドを呼び出す前に、このメソッドを呼び出す必要があります。

このメソッドはブロックする可能性があり、ゲーム セーブの同期中にユーザーへ UI が表示される場合があるため、ゲームの UI スレッドで呼び出さないでください。

指定したコンテナー内の指定した blob からデータを読み込むには、[Load](/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_load) を呼び出します。

<a id="requirementsSection" />

## 要件

**ヘッダー:** xgamesavewrappers.hpp

**サポート対象プラットフォーム:** Windows、XBOX One ファミリー本体、XBOX Series 本体

<a id="seealsoSection" />

## 関連項目

[Microsoft.Xbox.Wrappers.XGameSave.Provider](/reference/system/Wrappers/classes/provider/xgamesave_wrapper_provider)<br />[XGameSave ラッパー メンバー](/reference/system/Wrappers/xgamesave_wrapper_members)


## Related topics

- [HCInitialize](/ja-jp/reference/live/httpclient/httpclient/functions/hcinitialize.md)
- [PFInitialize](/ja-jp/services/playfab/api-references/c/pfcore/functions/pfinitialize.md)
- [XblInitialize](/ja-jp/reference/live/xsapi-c/xbox_live_global_c/functions/xblinitialize.md)
- [chat_manager::initialize](/ja-jp/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_initialize.md)
- [PFMultiplayerInitialize](/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayerinitialize.md)
