Microsoft DirectX 9.0

Handling Addresses

If you call the Host, EnumHosts, or Connect methods exposed by the IDirectPlay8Peer, IDirectPlay8Client, or IDirectPlay8Server you must pass address objects as parameters. If Microsoft?DirectPlay?does not have sufficient address information, the method that you called will fail, and it will return DPNERR_ADDRESSING. However, it is not necessary to have all the information in the address object at the time you call the method.

All address objects must have the service provider globally unique identifier (GUID) set. However, it is possible to omit other data values.

There are two important issues for IP and IPX service providers that you need to be aware of. Failing to handle them properly may cause your application to fail.

Note  Application developers who choose to override the default DirectPlay 8 dialog for Transmission Control Protocol/Internet Protocol (TCP/IP) are strongly urged to implement a solution that allows the user to override the port used for a connection or enumeration. One possible solution is to enable users to follow the host name with a colon and then the port, as implemented by the default DirectPlay 8 TCP/IP protocol dialog, for example: host.domain.com:8090. Another possible solution is to add a field to the user interface (UI) that enables the user to enter a port.

© 2002 Microsoft Corporation. All rights reserved.