Microsoft DirectX 8.1 (C++)

IDirectPlay8Peer::DestroyPeer

Deletes a peer from the session.

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 Values

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

DPNERR_INVALIDPARAM
DPNERR_INVALIDPLAYER
DPNERR_NOTHOST

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.

Requirements

  Windows NT/2000/XP: Available as a redistributable for Windows 2000 and later.
  Windows 98/Me: Available as a redistributable for Windows 98 and later.
  Header: Declared in Dplay8.h.