?/TD> |
Microsoft DirectX 9.0 |
Closes the IDirectPlay8ThreadPool object.
Syntax
HRESULT Close(
const DWORD dwFlags );
Parameters
- dwFlags
- [in] Reserved. Must be 0.
Return Value
Returns DPN_OK if successful. Otherwise, returns one of the following errors.
DPNERR_UNINITIALIZED The requested object has not been initialized. DPNERR_INVALIDFLAGS The flags passed to this method are invalid. DPNERR_NOTALLOWED This function is not allowed on this object.
Remarks
Any threads that exist will send a DPN_MSGID_DESTROY_THREAD message before this method will return.
DPNERR_NOTALLOWED is returned if this method is called when there is an outstanding call to IDirectPlay8ThreadPool::DoWork or if this method is called from an IDirectPlay8ThreadPool thread.
Always close the IDirectPlay8ThreadPool interface after closing all of the other Microsoft?DirectPlay?objects used by the process. Closing an IDirectPlay8ThreadPool interface that was in a IDirectPlay8ThreadPool::DoWork call before closing an IDirectPlay8Peer, IDirectPlay8Client, or IDirectPlay8Server interface can cause the IDirectPlay8ThreadPool interface to appear to hang.