DirectPlay Animated Header -- IDirectPlayLobby2::CreateAddress DirectPlay Animated Header -- IDirectPlayLobby2::CreateAddress* Microsoft DirectPlay SDK
*Index  *Topic Contents
*Previous Topic: IDirectPlayLobby2::Connect
*Next Topic: IDirectPlayLobby2::CreateCompoundAddress


IDirectPlayLobby2::CreateAddress


IDirectPlayLobby2 Interface

Creates a DirectPlay Address, given a service provider-specific network address. The resulting address contains the globally unique identifier (GUID) of the service provider and data that the service provider can interpret as a network address.

For more information about the DirectPlay Address, see DirectPlay Address. For a list of predefined Microsoft data types, see DirectPlay Address Data Types.

HRESULT CreateAddress(
  REFGUID guidSP,
  REFGUID guidDataType,
  LPCVOID lpData,
  DWORD dwDataSize,
  LPVOID lpAddress,
  LPDWORD lpdwAddressSize
  );

Parameters
guidSP
Pointer to the GUID of the service provider. (In C++, it is a reference to the GUID.)
guidDataType
Pointer to the GUID identifying the specific network address type being used. (In C++, it is a reference to the GUID.) For information about predefined network address types, see DirectPlay Address.
lpData
Pointer to a buffer containing the specific network address.
dwDataSize
Size, in bytes, of the network address in lpData.
lpAddress
Pointer to a buffer in which the constructed DirectPlay Address is to be written.
lpdwAddressSize
Pointer to a variable containing the size of the DirectPlay Address buffer. Before calling this method, the service provider must initialize lpdwAddressSize to the size of the buffer. After the method has returned, this parameter will contain the number of bytes written to lpAddress. If the buffer was too small (DPERR_BUFFERTOOSMALL), this parameter will be set to the size required to store the DirectPlay Address.
Return Values

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

DPERR_BUFFERTOOSMALL
DPERR_INVALIDPARAMS
Remarks

The IDirectPlayLobby2::CreateCompoundAddress method can be used to create longer DirectPlay Addresses than CreateAddress allows.

See Also

IDirectPlayLobby2::EnumAddress, IDirectPlayLobby2::CreateCompoundAddress

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page