Hello everyone, I am trying to validate my UWP app, so that I can publish it. Unfortunately I have stumbled upon an issue with SDL_net.dll
The error goes as following:
Error Found: The supported APIs test detected the following errors:
API WSACancelBlockingCall in wsock32.dll is not supported for this application type. SDL2_net.dll calls this API.
API GetAdaptersInfo in iphlpapi.dll is not supported for this application type. SDL2_net.dll calls this API.
Is there a flag I am not setting that results on using wsock32 and iphlpapi ?
For WSACancelBlockingCall, I would just comment out this line in SDLnet.c’s SDLNet_Quit()…
It’s just trying harder to shut down Winsock if some connection is still pending, etc, but it’s just as likely that you’re calling this with no open connections at all, and probably as you are terminating your app anyhow.
For GetAdaptersInfo, that’s used here:
If you don’t need to know your local IP address, just comment out the entire SDLNet_GetLocalAddresses function. This only reports the LAN address, which for most users is going to be behind a NAT and not actually be their public IP address.
If you absolutely need this function, Microsoft has guidelines on how to match the functionality in the BSD Sockets half of that ifdef without using GetAdaptersInfo:
…but my guess is you can probably just comment out the function and rebuild SDL_net.
We will probably fix this up, but this advice gets you up and running the fastest.
I’ve added this to Bugzilla so we don’t forget about it:
Thank you for the fast reply. I had already made a function to obtain local address info with the UWP API, to avoid the old windows dependencies problem. I thought to ask in case we there was a patch or a flag that can be set instead, but this is fine as well.