Platform SDK: DirectX

IDirectPlay4::Close

The IDirectPlay4::Close method closes a previously opened session. Any locally created groups will migrate to be owned by the host of the session.

HRESULT Close( );

Parameters

None.

Return Values

Returns DP_OK if successful, or one of the following error values otherwise:

DPERR_INVALIDOBJECT
DPERR_INVALIDPARAMS
DPERR_NOSESSIONS

Remarks

All locally created players will be destroyed and appropriate DPMSG_DELETEPLAYERFROMGROUP and DPMSG_DESTROYPLAYERORGROUP system messages will be sent to other session participants.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dplay.h.
  Import Library: Use dplayx.lib.

See Also

IDirectPlay4::DestroyPlayer, DPMSG_DESTROYPLAYERORGROUP, IDirectPlay4::Open