Platform SDK: DirectX |
This topic pertains only to applications written in C++.
An application can choose to use a fixed port rather than the DirectPlay default ports. If this is done, only the one port needs to be opened to allow that application (and only that application) to operate through a firewall.
To specify a fixed port, the application must create a DirectPlay address that contains the data chunk for DPAID_InetPort. The application can append the chunk to the lpAddress returned by IDirectPlay4::EnumConnections before passing it to IDirectPlay4::InitializeConnection. Alternatively, the application can create the DirectPlay address completely (specifying the service provider, IP address and port number) and pass that to InitializeConnection.
For more information, see DirectPlay Address.