?/TD>
Microsoft DirectX 9.0

IDirectPlay8Peer::DestroyPeer Method


Deletes a peer from the session.

Syntax

HRESULT DestroyPeer(      

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

Parameters

dpnidClient
[in] Variable of type DPNID that specifies the identifier of the peer to delete.
pDestroyInfo
[in] Pointer to a value that describes additional delete data information.
dwDestroyInfoSize
[in] Variable of type DWORD that specifies the size of the data contained in the pDestroyInfo parameter.
dwFlags
[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.


Remarks

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.