开发者

How to get my own IP address using WinINet functions

How can I get my own IP address using WinINet APIs? If it's not possible using WinINet APIs, counld you please suggest which Win32 library I have to use for this purpose?

I need the library which I can use in my C++ code. 开发者_JAVA百科I don't need a C# or .NET library.

Actually I have to use it in my Qt application.


You shoud use QList<QHostAddress> QNetworkInterface::allAddresses () [static]


Do you mean the public IP address or your interfaces' IP address? The public IP address can be extracted from the page whatismyip.com. The other answer gives you the local IP addresses.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜