IDirectPlay2::DestroyPlayer

HRESULT DestroyPlayer(DPID idPlayer);

Deletes a player from the session, removes any pending messages destined for that player from the message queue, and removes the player from any groups to which it belonged. The player ID will not be reused during the current session.

·Returns DP_OK if successful, or one of the following error messages otherwise:

DPERR_INVALIDOBJECT

DPERR_INVALIDPLAYER

idPlayer

Player ID of the player that is being removed from the session.

This method will generate a DPSYS_DELETEPLAYERFROMGROUP system message for each group that the player belongs to, and then a DPSYS_DESTROYPLAYERORGROUP system message. For a list of system messages, see Using System Messages.