IP Address

Can anyone tell me how to get the PCs IP address from C/C++?

Thanks!! And Merry Christmas!!!


Posted from eamail1-out.unisys.com [192.61.61.99]
via Mailgate.ORG Server - http://www.Mailgate.ORG

“Cenon, Michael V non Unisys” <michael.cenon@ph.unisys.com> wrote in message
news:F95A9631EAF6D311B55400105A1521C5ED9E59@PH-MNL-EXCH-1.ph.unisys.com

Can anyone tell me how to get the PCs IP address from C/C++?

Use gethostname(), gethostbyname() and inet_ntoa(). Look at the s_addr
member for the in_addr structure.

Augie

Thanks!! And Merry Christmas!!!


Posted from eamail1-out.unisys.com [192.61.61.99]
via Mailgate.ORG Server - > http://www.Mailgate.ORG