From: SourceForge.net <no...@so...> - 2006-02-22 18:18:45
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=3591487 By: dessent > is getaddrinfo simply not supported in Windows XP? No, it's exactly the opposite. The protocol-independant version function only exists in XP or greater. Prior to XP some wrappers were needed in order to make a version of getaddrinfo because of the mess of mixed ipv4/v6 stacks. In the MS pSDK is this done in WSPsApi.h which gives the illusion of getaddrinfo existing on those platforms where it doesn't. The comment in the w32api version of ws2tcpip.h indicates that no one has contributed a free implementation of this work yet. The _WIN32_WINNT variable is meant to be defined by the user, and its function is to indicate the minimum level of support that the output binary should target. If not set it defaults to all versions of windows. If you set it to 0x0501 (which corresponds to XP) or greater then you will be able to successfully link and call getaddrinfo(), but your program will fail at runtime on previous versions of windows where getaddrinfo() does not exist. So, in summary, it looks like your options are: - Define _WIN32_WINNT appropriately and generate a binary that will only run on XP or later - Implement your own getaddrinfo() wrappers similar to how the PSDK does it - Don't use getaddrinfo(), (e.g. using instead gethostbyaddr(), gethostbyname(), getservbyname(), or whatever) ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=286641 |