Index Topic Contents | |||
Previous Topic: IDirectPlayLobby2::EnumAddress Next Topic: IDirectPlayLobby2::EnumLocalApplications |
IDirectPlayLobby2::EnumAddressTypes
IDirectPlayLobby2 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.
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 Values
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, 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 IDirectPlay3::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
DirectPlay Address, IDirectPlayLobby2::CreateAddress
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.