Platform SDK: DirectX

IDirectPlayLobby3::EnumAddressTypes

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
);

Parameters

lpEnumAddressTypeCallback
Pointer to the EnumAddressTypeCallback function that will be called for each address type for a service provider. If the service provider takes no address type, the callback will not be called.
guidSP
Pointer to the GUID of the service provider whose address types are to be enumerated. (In C++, it is a reference to the GUID.)
lpContext
Context that will be passed to the callback function.
dwFlags
Reserved; must be 0.

Return Values

Returns DP_OK if successful, or one of the following error values otherwise:

DPERR_EXCEPTION
DPERR_INVALIDOBJECT
DPERR_INVALIDPARAMS

Remarks

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.

Requirements

  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.

See Also

DirectPlay Address, IDirectPlayLobby3::CreateAddress