Re: DNS server temporary change
Chris Raine <[email protected]>
| Newsgroups | gmane.games.devel.windows |
|---|---|
| Message-ID | <1081343979.3766.12.camel@ReGen> |
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. All these functions are well documented in the Platform SDK -> Windows Sockets. Of course, you have to link against the WinSock Library and IIRC you have to initialize the library as well. hoping to have helped, chris On Tue, 2004-04-06 at 12:10, Diogo de Andrade wrote: > Hey all! > > 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? > > Thanks in advance > > Diogo de Andrade > [email protected] > > > > > > > ------------------------------------------------------- > 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=1470&alloc_id=3638&op=click > _______________________________________________ > Gamedevlists-windows mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 >
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQBAc//rbYsg67DxFJcRAnitAJsG2EA5XW0GfFROavqY8gxIYYFtlwCcDHni MUp6rS6Ufhjy6svp7PQ7TJE= =UzVF -----END PGP SIGNATURE-----