> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFLobbyGetRestrictInvitesToLobbyOwner

> PFLobbyGetRestrictInvitesToLobbyOwner reference for checking whether only the lobby owner is permitted to send invites in the PlayFab Multiplayer C++ SDK.

Gets the lobby's current policy for whether only the lobby owner can send invites to join the lobby.

## Syntax

```cpp theme={null}
HRESULT PFLobbyGetRestrictInvitesToLobbyOwner(  
    PFLobbyHandle lobby,  
    bool* restrictInvitesToLobbyOwner  
)  
```

### Parameters

**`lobby`**   PFLobbyHandle

The handle of the lobby.

**`restrictInvitesToLobbyOwner`**   bool\*\
*output*

The output value indicating whether the current policy only the lobby owner can send invites to join the lobby.

### Return value

Type: HRESULT

`S_OK` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PFMultiplayerGetErrorMessage()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage.md).

## Remarks

When true, only the lobby owner can send invites. When false, any member can send invites. Can only be true for client-owned lobbies. \
\
&#x20;If this lobby object was created by calling [PFMultiplayerJoinLobby()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerjoinlobby.md), this method returns an error until [PFMultiplayerStartProcessingLobbyStateChanges()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges.md) provides a [PFLobbyUpdatedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange.md) with [PFLobbyUpdatedStateChange::restrictInvitesToLobbyOwnerUpdated](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange.md) set to true. If joining the lobby succeeds, this field is guaranteed to be populated by the time PFMultiplayerStartProcessingLobbyStateChanges() provides a [PFLobbyJoinLobbyCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyjoinlobbycompletedstatechange.md).   \
\
&#x20;If this lobby object was created by calling [PFMultiplayerClaimServerLobby()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerclaimserverlobby.md), this method returns an error until [PFMultiplayerStartProcessingLobbyStateChanges()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges.md) provides a [PFLobbyUpdatedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange.md) with [PFLobbyUpdatedStateChange::restrictInvitesToLobbyOwnerUpdated](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange.md) set to true. If claiming the lobby succeeds, this field is guaranteed to be populated by the time PFMultiplayerStartProcessingLobbyStateChanges() provides a [PFLobbyClaimServerLobbyCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyclaimserverlobbycompletedstatechange.md).

## Requirements

**Header:** PFLobby.h

## See also

[PFLobby members](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)


## Related topics

- [PlayFab Multiplayer C++ SDK Release Notes](https://docs.xbox.com/services/playfab/multiplayer/lobby/lobby-matchmaking-sdks/lobby-and-matchmaking-release-notes.md)
- [PFMultiplayer C/C++ API overview - PFLobby.h](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)
- [PFLobbyGetOwner](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetowner.md)
- [Lobby.TryGetOwner](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/Lobby/TryGetOwner.md)
- [PFLobbyGetOwnerMigrationPolicy](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetownermigrationpolicy.md)
