Platform SDK: DirectX |
The DirectPlay4.GetDPEnumGroupPlayers method enumerates the players belonging to a specific group in the currently open session.
GetDPEnumGroupPlayers(GroupId As Long, _ sessionGuid As String, _ flags As CONST_DPENUMPLAYERFLAGS) _ As DirectPlayEnumPlayers
Can be one or more of the following values from the CONST_DPENUMPLAYERFLAGS enumeration:
If the method succeeds, it returns a DirectPlayEnumPlayers object.
If the method fails, an error is raised and Err.Number may be set to one of the following values:
DPERR_ACCESSDENIED |
DPERR_CONNECTIONLOST |
DPERR_INVALIDPARAMS |
DPERR_INVALIDGROUP |
DPERR_NOSESSIONS |
DPERR_UNAVAILABLE |
This method returns DPERR_ACCESSDENIED if the session is a lobby session you are not connected to. It returns DPERR_INVALIDPARAMS if an invalid sessionGuid or invalid flags were supplied. It returns DPERR_NOSESSIONS if there is no active session. It returns DPERR_UNAVAILABLE if the session could not be enumerated.
Password-protected remote sessions cannot be enumerated. You cannot use the method in a lobby session you are not connected to.
By default, this method will enumerate all players in the current session. The DPENUMPLAYERS_SESSION flag can be used, along with a session instance GUID, to request that a session's host provide its list for enumeration. Use of the DPENUMPLAYERS_SESSION flag with this method must occur after the DirectPlay4.GetDPEnumSessions method has been called, and before any calls to the DirectPlay4.Close or DirectPlay4.Open methods.
DirectPlay4.CreatePlayer, DirectPlay4.DestroyPlayer, DirectPlay4.AddPlayerToGroup, DirectPlay4.DeletePlayerFromGroup, Using GUIDs