|Microsoft DirectX 9.0|
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 will cancel any operations still outstanding, 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 IDirectPlay8Peer::SendTo calls to complete before calling IDirectPlay8Peer::Close.
If this method is called by the host player and host migration has been enabled, the host will migrate and the session will continue for other players. If host migration is not enabled, the session will terminate. If the host player wants to terminate the session without host migration, IDirectPlay8Peer::TerminateSession should be called before calling IDirectPlay8Peer::Close. See Host Migration for more information.
To start a new session or connect to another session after calling IDirectPlay8Peer::Close, you must first call IDirectPlay8Peer::Initialize on the IDirectPlay8Peer object before calling IDirectPlay8Peer::Host or IDirectPlay8Peer::Connect.