?/TD>
Microsoft DirectX 9.0

IDirectPlay8NATResolver::Initialize Method


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_ALREADYINITIALIZEDThe object has already been initialized.
DPNERR_INVALIDFLAGSThe flags passed to this method are invalid.
DPNERR_INVALIDOBJECTThe Microsoft?DirectPlay?object pointer is invalid.
DPNERR_INVALIDPARAMOne or more of the parameters passed to the method are invalid.




© 2002 Microsoft Corporation. All rights reserved.