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

# 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()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage).

## 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. <br /><br /> If this lobby object was created by calling [PFMultiplayerJoinLobby()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerjoinlobby), this method returns an error until [PFMultiplayerStartProcessingLobbyStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges) provides a [PFLobbyUpdatedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange) with [PFLobbyUpdatedStateChange::restrictInvitesToLobbyOwnerUpdated](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange) set to true. If joining the lobby succeeds, this field is guaranteed to be populated by the time PFMultiplayerStartProcessingLobbyStateChanges() provides a [PFLobbyJoinLobbyCompletedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyjoinlobbycompletedstatechange).   <br /><br /> If this lobby object was created by calling [PFMultiplayerClaimServerLobby()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerclaimserverlobby), this method returns an error until [PFMultiplayerStartProcessingLobbyStateChanges()](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerstartprocessinglobbystatechanges) provides a [PFLobbyUpdatedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange) with [PFLobbyUpdatedStateChange::restrictInvitesToLobbyOwnerUpdated](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyupdatedstatechange) set to true. If claiming the lobby succeeds, this field is guaranteed to be populated by the time PFMultiplayerStartProcessingLobbyStateChanges() provides a [PFLobbyClaimServerLobbyCompletedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbyclaimserverlobbycompletedstatechange).

## Requirements

**Header:** PFLobby.h

## See also

[PFLobby members](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members)


## Related topics

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