|Microsoft DirectX 9.0|
Closes the open connection to a session and uninitializes the IDirectPlay8Server object.
const DWORD dwFlags );
- [in] The following flag can be specified.
- Close immediately. Do not wait for outstanding calls to complete.
Returns S_OK if successful, or the following error value.
DPNERR_UNINITIALIZED The requested object has not been initialized.
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 IDirectPlay8Server::Close returns, you can safely shut down the server application.
Calling IDirectPlay8Server::Close will cancel all outstanding operations, including guaranteed messages that are in the queue waiting to be sent. Messages that have already been sent as guaranteed will continue to be retried until acknowledgement of their delivery has been received. To make sure all messages are sent, wait for all outstanding IDirectPlay8Server::SendTo calls to complete before calling IDirectPlay8Server::Close.