Microsoft DirectX 9.0 SDK Update (Summer 2003) |
Initializes the IDirectPlay8NATResolver interface. This method must be called before calling any other methods of this interface.
Syntax
HRESULT Initialize(
const PVOID pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags );
Parameters
- pvUserContext
- [in] Pointer to the user-provided context value in calls to the message handler. A user-provided context value can be used to differentiate messages coming from multiple interfaces to a common message handler.
- pfn
- [in] Pointer to a PFNDPNMESSAGEHANDLER callback function that is used to receive all messages.
- dwFlags
- [in] The following flag can be set.
- DPNINITIALIZE_DISABLEPARAMVAL
- Passing this flag will disable parameter validation for the current object.
Return Value
Returns DPN_OK if successful, or one of the following error values.
DPNERR_ALREADYINITIALIZED The object has already been initialized. DPNERR_INVALIDFLAGS The flags passed to this method are invalid. DPNERR_INVALIDOBJECT The Microsoft® DirectPlay® object pointer is invalid. DPNERR_INVALIDPARAM One or more of the parameters passed to the method are invalid.