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

# XblMultiplayerSessionSetAllocateCloudCompute

> XblMultiplayerSessionSetAllocateCloudCompute

# XblMultiplayerSessionSetAllocateCloudCompute

如果设置了此属性，将尝试分配 “cloudComputePackage”。

## 语法

```cpp theme={null}
void XblMultiplayerSessionSetAllocateCloudCompute(  
         XblMultiplayerSessionHandle handle,  
         bool allocateCloudCompute  
)  
```

### 参数

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

多人游戏会话的句柄。

*allocateCloudCompute*   \_In\_\
类型：bool

如果应分配云计算包，则为 true；否则为 false。

### 返回值

类型：void

## 要求

**头文件：** multiplayer\_c.h

**库：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另请参阅

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


## Related topics

- [会话模板常量](/zh-CN/services/xbox-services/multiplayer/mpsd/concepts/live-session-template-constants.md)
- [XblMultiplayerSessionProperties](/zh-CN/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessionproperties.md)
- [XblMultiplayerSessionConstants](/zh-CN/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessionconstants.md)
- [XblMultiplayerSessionSetSessionChangeSubscription](/zh-CN/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetsessionchangesubscription.md)
- [PartyXblManager::SetMemoryCallbacks](/zh-CN/services/playfab/multiplayer/networking/xblreference/classes/PartyXblManager/methods/partyxblmanager_setmemorycallbacks.md)
