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

# PFMultiplayerStartProcessingLobbyStateChanges

> 前回の呼び出し以降に処理する PlayFab Multiplayer ロビー用の PFLobbyStateChange エントリ配列を取得し、タイトルが状態や UI を更新できるようにします。

前回の呼び出し以降に処理すべきすべての PFLobbyStateChange の配列を取得します。

## 構文

```cpp theme={null}
HRESULT PFMultiplayerStartProcessingLobbyStateChanges(  
    PFMultiplayerHandle handle,  
    uint32_t* stateChangeCount,  
    const PFLobbyStateChange* const** stateChanges  
)  
```

### パラメーター

**`handle`**   PFMultiplayerHandle

PFMultiplayer API インスタンスのハンドル。

**`stateChangeCount`**   uint32\_t\*\
*出力*

タイトルが `stateChanges` 配列で処理する PFLobbyStateChange エントリの出力数。

**`stateChanges`**   PFLobbyStateChange\* const\*\*\
*ライブラリが割り当てる `*stateChangeCount` サイズの出力配列*

タイトルが処理し、その後 [PFMultiplayerFinishProcessingLobbyStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerfinishprocessinglobbystatechanges) に渡す、すべての PFLobbyStateChange エントリを含むライブラリ割り当ての出力配列。

### 戻り値

型: HRESULT

呼び出しが成功した場合は `S_OK`、それ以外の場合はエラー コード。エラー コードの人間が判読可能な形式は、[PFMultiplayerGetErrorMessage()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage) を通じて取得できます。

## 解説

このメソッドは、リモート デバイスやサービスと状態を同期する機会をロビー ライブラリに与え、前回このメソッドを呼び出して以降にタイトルが利用できるすべての変更のリストを取得します。タイトルは、提供された 0 個以上の変更の配列を使って自身の状態や UI を更新し、その後、速やかに [PFMultiplayerFinishProcessingLobbyStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerfinishprocessinglobbystatechanges) にこれらを渡す必要があります。<br /><br /> ライブラリから公開されるロビー ライブラリの状態は、この呼び出し中に変化する可能性があるため、その使用ではスレッド セーフである必要があります。たとえば、UI スレッドで PFMultiplayerStartProcessingLobbyStateChanges() を呼び出しつつ、別のワーカー スレッドで [PFLobbyGetMembers()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetmembers) が返したロビー メンバーの一覧をループしていると、PFMultiplayerStartProcessingLobbyStateChanges() がメンバー一覧に関連付けられたメモリを変更する可能性があるためクラッシュを引き起こす場合があります。PFMultiplayerStartProcessingLobbyStateChanges() は頻繁に、少なくとも 1 グラフィックス フレームごとに 1 回呼び出す必要があります。無視できる程度の影響でメイン UI スレッドから呼び出せるように、素早く実行して戻るように設計されています。最良の結果を得るには、PFMultiplayerFinishProcessingLobbyStateChanges() を呼び出すまでの状態変化の処理時間も最小限に抑える必要があります。<br /><br /> PFMultiplayerStartProcessingLobbyStateChanges() が返した各状態変化は、必ず 1 回だけ PFMultiplayerFinishProcessingLobbyStateChanges() に返却する必要がありますが、順不同でも構わず、他の PFMultiplayerStartProcessingLobbyStateChanges() 呼び出しの状態変化と交互に返却してもかまいません。特定の状態変化に関連するリソースは、その状態変化が PFMultiplayerFinishProcessingLobbyStateChanges() に返却されるまで有効であることが保証されます。

## 要件

**ヘッダー:** PFLobby.h

## 関連項目

[PFLobby メンバー](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members)\
[PFLobbyStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbystatechange)\
[PFMultiplayerFinishProcessingLobbyStateChanges](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerfinishprocessinglobbystatechanges)


## Related topics

- [PFMultiplayerFinishProcessingLobbyStateChanges](/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerfinishprocessinglobbystatechanges.md)
- [PFLobbyStateChange](/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbystatechange.md)
- [PFLobbyGetLobbyId](/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetlobbyid.md)
- [PFLobbyUpdatedStateChange](/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange.md)
- [PFLobbyGetOwner](/ja-jp/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetowner.md)
