DirectX SDK |
The IDirectPlayLobby3::EnumAddressTypes method enumerates all the address types that a given service provider needs to build the DirectPlay address. The application or lobby can use this information to obtain the correct information from the user and create a DirectPlay address.
HRESULT EnumAddressTypes( LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback, REFGUID guidSP, LPVOID lpContext, DWORD dwFlags );
Returns DP_OK if successful, or one of the following error values otherwise:
DPERR_EXCEPTION |
DPERR_INVALIDOBJECT |
DPERR_INVALIDPARAMS |
You can use EnumAddressTypes to determine if a service provider displays dialog boxes prompting the user for information; for example, a dialog box that asks for an IP address. If the service provider takes no address types, then it needs no information and will not display the dialog boxes.
An application can call IDirectPlay4::GetPlayerAddress to obtain a list of valid choices for an address type. This is only available for the modem-to-modem service providers. DirectPlay address data types that are null-terminated Unicode strings end in W (for example, DPAID_INetW), while DirectPlay address data types that are null-terminated ANSI strings do not (for example, DPAID_INet). For a list of predefined Microsoft data types, see DirectPlay Address Data Types.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dplobby.h.
Import Library: Use dplayx.lib.