Microsoft DirectX 9.0

IDirectPlay8ThreadPool::Initialize Method

Initializes the thread pool interface for the process.


HRESULT Initialize(      

    PVOID const pvUserContext,     const PFNDPNMESSAGEHANDLER pfn,     const DWORD dwFlags );


[in] User context for all message callbacks.
[in] Pointer to a PFNDPNMESSAGEHANDLER function to handle thread pool messages.
[in] The following flag can be specified.
Disables parameter validation.

Return Value

Returns DPN_OK if successful. Otherwise, returns one of the following errors.

DPNERR_ALREADYINITIALIZEDThe object has already been initialized.
DPNERR_INVALIDFLAGSThe flags passed to this method are invalid.
DPNERR_INVALIDPARAMOne or more of the parameters passed to the method are invalid.
DPNERR_NOTALLOWEDThis function is not allowed on this object.


Only one IDirectPlay8ThreadPool object is allowed in a process. DPNERR_ALREADYINITALIZED is returned if IDirectPlay8ThreadPool::Initialize is called on a second IDirectPlay8ThreadPool object.

If a Microsoft?DirectPlay?object has already created threads, the IDirectPlay8ThreadPool object cannot be initialized. If the IDirectPlay8ThreadPool object has not been initialized, DPNERR_NOTALLOWED will be returned.

© 2002 Microsoft Corporation. All rights reserved.