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

# XblMultiplayerSessionSetLocked

> XblMultiplayerSessionSetLocked

# XblMultiplayerSessionSetLocked

セッションがロックされているかどうかを設定します。ロックされている場合、セッションを離脱したメンバーはセッションに戻ることができ、その空きを他のユーザーが取ることはできません。

## 構文

```cpp theme={null}
void XblMultiplayerSessionSetLocked(  
         XblMultiplayerSessionHandle handle,  
         bool locked  
)  
```

### パラメーター

*handle*   \_In\_\
型: [XblMultiplayerSessionHandle](/reference/live/xsapi-c/multiplayer_c/handles/xblmultiplayersessionhandle)

マルチプレイヤー セッションへのハンドル。

*locked*   \_In\_\
型: bool

セッションをロックする必要がある場合は true、それ以外の場合は false を設定します。

### 戻り値

型: void

## 解説

セッションがロックされている場合は、closed にも設定する必要があります。

## 要件

**ヘッダー:** multiplayer\_c.h

**ライブラリ:** Microsoft.Xbox.Services.14x.GDK.C.lib

## 関連項目

[multiplayer\_c](/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members)


## Related topics

- [XblMultiplayerSessionSetSessionChangeSubscription](/ja-jp/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetsessionchangesubscription.md)
- [XblMultiplayerSessionSetClosed](/ja-jp/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetclosed.md)
- [XblMultiplayerSessionConstantsSetMaxMembersInSession](/ja-jp/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionconstantssetmaxmembersinsession.md)
- [XblMultiplayerSessionSetMatchmakingTargetSessionConstantsJson](/ja-jp/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetmatchmakingtargetsessionconstantsjson.md)
- [XblMultiplayerSessionSetInitializationSucceeded](/ja-jp/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetinitializationsucceeded.md)
