|Microsoft DirectX 9.0|
Closes the open connection to a session and uninitializes the IDirectPlay8Client object. This method must be called on any object that is successfully initialized with a call to the IDirectPlay8Client::Initialize method.
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.
Calling IDirectPlay8Client::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 IDirectPlay8Client::Send calls to complete before calling IDirectPlay8Client::Close.
If you do not want the application to wait, the application should call IDirectPlay8Client::CancelAsyncOperation to cancel all outstanding sends prior to calling IDirectPlay8Client::Close or doing a final release call on the IDirectPlay8Client interface. Failing to do so causes unpredictable results.