Le Saint

Hi all !!!!!!!

I'm building an UPnP MediaServer and I need to get the local IP Address. I do it programmatically in C++ with VC++ but the problem is that I may have several IP Addresses hosted by the computer.

Does any body know to get IP Address from UPnP Stack using the UPnP API provided by Microsoft Platform SDK

Thanks to all.



Re: Smart Devices Native C++ Development getting IP Address

Saravanan V V

Hi

Please check the IP Helper class realated funcation like GetTcpTable, GetUdpTable ,GetIfTable etc to get the IP Address.

Read this link.





Re: Smart Devices Native C++ Development getting IP Address

Kausik Das

Generally gethostbyname('"') returns the IP address of the device. Using IfTable you can get several IPs and programmatically you'll need to choose the correct one!