IDirectPlay8Address::BuildFromDPADDRESS Method

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

IDirectPlay8Address::BuildFromDPADDRESS Method


Sets the current object's internal address to be the Microsoft® DirectPlay® 8 equivalent of the specified DirectPlay 4 address. The purpose of this method is to allow lobby developers to launch games with the new DirectPlay interface using the old lobby code.

This method enumerates the address components in the specified address and adds the corresponding element to the DirectPlay 8 address.

Syntax

HRESULT BuildFromDPADDRESS(      
    LPVOID pvAddress,     DWORD dwDataSize );

Parameters

pvAddress
[in] Pointer to a DirectPlay 4 address that will be converted to the DirectPlay 8 address format.
dwDataSize
[in] Size of data contained in the pvAddress parameter.

Return Value

Returns S_OK if successful, or one of the following error values.

DPNERR_INVALIDADDRESSFORMATThe address format is invalid.
DPNERR_INVALIDOBJECTThe DirectPlay object pointer is invalid.
DPNERR_INVALIDPOINTERPointer specified as a parameter is invalid.

Remarks

This method builds a DirectPlay 8 address from a DirectPlay 4 address. This method will clear the current address of all elements before building the new address.

This method has the following limitations.

  • The method cannot map the DPAID_Modem address element because DirectPlay 4 used modem names, while DirectPlay 8 uses globally unique identifiers (GUIDs) to identify modems.
  • Elements of the DirectPlay 4 address that are not part of the predefined DirectPlay 4 address elements will result in an error and a return value of DPNERR_INVALIDADDRESSFORMAT. See DirectPlay 4 documentation on DirectPlay addresses for a complete list of the DirectPlay 4 address elements.



© 2003 Microsoft Corporation. All rights reserved.