Microsoft DirectX 9.0 SDK Update (Summer 2003) |
DirectPlay Address Objects
Microsoft® DirectPlay® does not handle URL strings directly. Instead, the string must be encapsulated in a DirectPlay address object (CLSID_DirectPlay8Address). This object exposes the IDirectPlay8Address interface that enables you to insert URL information into, or extract it from, the address object.
To create DirectPlay address, you must call CoCreateInstance to create a DirectPlay address object. You can then define the address in one of two ways:
- Create the URL string directly. Then use either IDirectPlay8Address::BuildFromURLA or IDirectPlay8Address::BuildFromURLW to insert the complete string.
- Use IDirectPlay8Address methods to insert the various pieces of data that make up the string directly into the object. For details see:
When you receive an address object, you have a similar pair of options.
- Extract the entire URL string with either IDirectPlay8Address::GetURLA or IDirectPlay8Address::GetURLW. Then parse the string and extract the needed information
- Use other IDirectPlay8Address methods to extract the particular data you are interested in from the address object.