IDirectPlayLobby3::CreateAddress
IDirectPlayLobby3 InterfaceCreates 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.
Note that with IDirectPlayLobby3::CreateCompoundAddress you can create addresses with more than one data chunk. Therefore, you should use IDirectPlayLobby3::CreateCompoundAddress.
For more information about the DirectPlay Address, see DirectPlay Address. For a list of predefined Microsoft data types, see DirectPlay Address Data Types.
Syntax
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 Value
Returns DP_OK if successful, or one of the following error values otherwise:
DPERR_BUFFERTOOSMALL DPERR_INVALIDPARAMS Remarks
The IDirectPlayLobby3::CreateCompoundAddress method can be used to create longer DirectPlay Addresses than CreateAddress allows.
See Also
IDirectPlayLobby3::EnumAddress, IDirectPlayLobby3::CreateCompoundAddress
Top of Page
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.