Microsoft DirectX 8.1 (C++) |
Closes the open connection to a session.
HRESULT Close( const DWORD dwFlags );
Returns S_OK if successful, or the following error value.
DPNERR_UNINITIALIZED |
This method must be called on any object successfully initialized with IDirectPlay8Server::Initialize.
This method is a counterpart to IDirectPlay8Server::Host. It closes all active network connections hosted by the server. This method is synchronous, and will not return until the server has processed all DPN_MSGID_DESTROY_PLAYER messages. This feature guarantees that when Close returns, you can safely shut down the server application.
Calling Close will cancel all outstanding operations, including data sent as guaranteed. To make sure all messages are sent, wait for all outstanding SendTo calls to complete before calling Close.
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.