Microsoft DirectX 8.0 (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
Variable of type DPNID that specifies the identifier of the peer to delete.
pDestroyInfo
Pointer to a value that describes additional delete data information.
dwDestroyInfoSize
Variable of type DWORD that specifies the size of the data contained in the pDestroyInfo parameter.
dwFlags
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: Available as a redistributable for Windows 2000 and later.
  Windows 95/98: Available as a redistributable for Windows 95 and later.
  Header: Declared in Dplay8.h.