开发者

How to get gethostid behavior on windows 7?

开发者 https://www.devze.com 2023-02-17 12:47 出处:网络
I am porting a Linux code that uses &l开发者_如何学Pythont;unistd.h>, specifically gethostid function, to Windows 7.

I am porting a Linux code that uses &l开发者_如何学Pythont;unistd.h>, specifically gethostid function, to Windows 7.

I need an unique number of 32 bits that I will use in my application. How can I obtain an unique number using API from Windows 7 in the same manner that I do on Linux?

Thanks.


You would normally implement this by returning the local IP address, for example by calling getaddrinfo().

0

精彩评论

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