DirectPlay8, client program, get IP address
Greetings mortals, I'm programming on a communication program. The server creating is OK, I want to enumerate the available hosts. I found a server, and get it's IDirectPlay8Address class. I heard that the "GetComponentByName" function is useless to get the physics IP, so I have tried to use the QueryInterface method, like this: pAddressSender.QueryInterface(CLSID_DirectPlay8Address, IP); The IP parameter is IDirectPlay8AddressIP. But it returns with message: "The interface is not supported". When I create the server, I set up it's provider, and port. A IP didn't, because I think I can't override the available IP. The program runs on LAN. Please don't prefer me to use winSock, because I don't want to throw out the extant. :-)
I'm getting near the sollution :)
Finally I could get the IPaddress interface. I ask for information with :GetAddress method. It returns with a CORRECT port number - and the host string only contain '1'.
o_O
What I'm goint to do?
Finally I could get the IPaddress interface. I ask for information with :GetAddress method. It returns with a CORRECT port number - and the host string only contain '1'.
o_O
What I'm goint to do?
I'm almost solved this!!
I get the address with this:
pAddressSender.GetComponentByName(DPNA_KEY_HOSTNAME, buff, SIZE,TIPE);
The BUFF contain the IP address, I guess. And how to convert it into a string???
I get the address with this:
pAddressSender.GetComponentByName(DPNA_KEY_HOSTNAME, buff, SIZE,TIPE);
The BUFF contain the IP address, I guess. And how to convert it into a string???
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement