Microsoft DirectX 9.0

IDirectPlay8Peer::DestroyPeer Method

Deletes a peer from the session.


HRESULT DestroyPeer(      

    const DPNID dpnidClient,     void *const pDestroyInfo,     const DWORD dwDestroyInfoSize,     const DWORD dwFlags );


[in] Variable of type DPNID that specifies the identifier of the peer to delete.
[in] Pointer to a value that describes additional delete data information.
[in] Variable of type DWORD that specifies the size of the data contained in the pDestroyInfo parameter.
[in] Reserved. Must be 0.

Return Value

Returns S_OK if successful, or one of the following error values.

DPNERR_INVALIDPARAMOne or more of the parameters passed to the method are invalid.
DPNERR_INVALIDPLAYERThe player ID is not recognized as a valid player ID for this game session.
DPNERR_NOTHOSTThe client attempted to connect to a nonhost computer. Additionally, this error value may be returned by a nonhost that tried to set the application description.


A player can only be deleted by the session host. The deleted player will be notified through a DPN_MSGID_TERMINATE_SESSION message. The structure associated with the message will contain the data passed through the pDestroyInfo parameter. If any other session member calls this method, it will fail, and return DPNERR_NOTHOST.

© 2002 Microsoft Corporation. All rights reserved.