Microsoft DirectX 8.1 (C++) |
Closes the open connection to a session. This method must be called on any object that is successfully initialized with a call to the IDirectPlay8Client::Initialize method.
HRESULT Close( const DWORD dwFlags );
Returns S_OK if successful, or the following error value.
DPNERR_UNINITIALIZED |
Calling Close will cancel all outstanding operations, including data sent as guaranteed. To make sure all messages are sent, wait for all outstanding Send calls to complete before calling 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.
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.