Re: [GD-Windows] DNS server temporary change
Brought to you by:
vexxed72
From: Chris R. <c....@gm...> - 2004-04-07 13:19:25
|
I would use getaddrinfo() to fill a addrinfo structure or use gethostname() to fill a hostent structure. If the name you specified exists both structures will contain the IP-Address in network byte-order which can be converted to an ascii string by the use of the inet_ntoa() function.=20 All these functions are well documented in the Platform SDK -> Windows Sockets.=20 Of course, you have to link against the WinSock Library and IIRC you have to initialize the library as well.=20 hoping to have helped,=20 chris=20 On Tue, 2004-04-06 at 12:10, Diogo de Andrade wrote: > Hey all! >=20 > I have an application running on a computer with some DNS settings... > The problem is, sometimes I need to resolve an name to an IP address, > and I can only do that through another DNS server... My question is, is > it possible to do so in C++? Or will I have to use the command line > "nslookup" and parse the result? Or the only way is to implement a > complete DNS client? >=20 > Thanks in advance >=20 > Diogo de Andrade > dio...@sp... >=20 >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 >=20 |