?/TD> |
Microsoft DirectX 9.0 |
Initializes the thread pool interface for the process.
Syntax
HRESULT Initialize(
PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags );
Parameters
- pvUserContext
- [in] User context for all message callbacks.
- pfn
- [in] Pointer to a PFNDPNMESSAGEHANDLER function to handle thread pool messages.
- dwFlags
- [in] The following flag can be specified.
- DPNINITIALIZE_DISABLEPARAMVAL
- Disables parameter validation.
Return Value
Returns DPN_OK if successful. Otherwise, returns one of the following errors.
DPNERR_ALREADYINITIALIZED The object has already been initialized. DPNERR_INVALIDFLAGS The flags passed to this method are invalid. DPNERR_INVALIDPARAM One or more of the parameters passed to the method are invalid. DPNERR_NOTALLOWED This function is not allowed on this object.
Remarks
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.