?/TD>
Microsoft DirectX 9.0

IDirectPlayNATHelp::Initialize Method


Initializes an IDirectPlayNATHelp object. This method must be called before using any other functions.

Syntax

HRESULT Initialize(      

    const DWORD dwFlags );

Parameters

dwFlags
[in]  Can be one of the following values.
DPNHINITIALIZE_DISABLEGATEWAYSUPPORT
Do not attempt to traverse the Internet gateway.
DPNHINITIALIZE_DISABLELOCALFIREWALLSUPPORT
Do not attempt to traverse a local firewall.

Return Value

Returns DPNH_OK if successful, or one of the following error values.

DPNHERR_ALREADYINITIALIZED This object has already been initialized.
DPNHERR_GENERIC An error occurred while closing.
DPNHERR_INVALIDFLAGS Invalid flags were specified.
DPNHERR_INVALIDOBJECT The interface object is invalid.
DPNHERR_INVALIDPARAM An invalid parameter was specified.
DPNHERR_OUTOFMEMORY There is not enough memory to perform this operation.
DPNHERR_REENTRANT The interface has been re-entered on the same thread.


Remarks

This method does not attempt to contact any Internet gateway servers.

Call IDirectPlayNATHelp::GetCaps with the DPNHGETCAPS_UPDATESERVERSTATUS flag set to search for a server.



© 2002 Microsoft Corporation. All rights reserved.