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()
.
精彩评论