IDirectPlayLobby3::EnumAddressTypes
IDirectPlayLobby3 InterfaceEnumerates 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.
Syntax
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 zero.
Return Value
Returns DP_OK if successful, or one of the following error values otherwise:
DPERR_EXCEPTION DPERR_INVALIDOBJECT DPERR_INVALIDPARAMS Remarks
For more information about the DirectPlay Address, see DirectPlay Address. 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.
See Also
Top of Page
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.