HRESULT EnableNewPlayers(BOOL bEnable);
Enables or disables the creation of new players.
·Returns DP_OK if successful, or DPERR_INVALIDOBJECT otherwise.
bEnable
If TRUE (the default condition for a session), new players can be created unless the session has reached its maximum capacity. If FALSE, any attempt to create a new player will return an error.
This method does not affect your ability to create groups. Typically, new players and groups can be added to a session until the session's player limit has been reached. This method can override this behavior if, for example, a session is in progress and new players are not desired. The IDirectPlay::EnumSessions method will not enumerate sessions where IDirectPlay::EnableNewPlayers has been set to FALSE unless the DPENUMSESSIONS_ALL flag is used.