This method of the DirectPlay2 Class enumerates the players in a session. Use the stopEnumPlayers method to stop the enumeration.
public void enumPlayers(_Guid sessionGuid, IEnumPlayersCallback2 callback, IUnknown context, int flags);
sessionGuid | A GUID of the DirectPlay session of interest. This parameter must be set to NULL unless the DPENUMPLAYERS_SESSION flag is specified. |
callback | The callback instance that contains the callback function that will be called for every group in the session. |
context | A caller-defined context that is passed to each enumeration callback. |
flags | One or more values of the DPENUMPLAYERS_GROUP type. The values are also passed to the callback function. |
By default, this method will enumerate players in the current open session. Groups can also be included in the enumeration by using the DPENUMPLAYERS_GROUP flag. The DPENUMPLAYERS_SESSION flag can be used with a session instance GUID to request that a session host provide its list for enumeration. This method cannot be called from within an enumSessions enumeration. Also, use of the DPENUMPLAYERS_SESSION flag with this method must occur after the enumSessions method has been called, and before any calls to close or open.
createPlayer, destroyPlayer, enumSessions, stopEnumPlayers