IDirectPlay::DestroyPlayer

HRESULT DestroyPlayer(DPID pidID);

Deletes a player from the game 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

pidID

ID of the player that is being removed from the game.

Calling this method automatically sends a DPMSG_DELETEPLAYER system message to all other players, informing them that this player has been removed from the session.