So I'm trying to do some Windows programming. I've build a little server program which listens for a connection, receives 63 bytes and prints them. The thing is, everything works perfectly when I include winsock2.h and link to WS2_32.lib, but when I instead try to load the DLL at runtime using LoadLibrary, binding doesn't work (error code 10047: Address family not supported by protocol family.) even though the rest of the code is the same, and I've confirmed that even though I'm not including winsock2.h, the #defines have the correct values.
Any idea what might be wrong (aside programming for Windows in general)?
Name:
Anonymous2010-02-03 13:56
I haven't done any C coding in a while, but don't you need extra compile time flags for that?
>>11
No, >>5 implied that I had one problem before I tried some Windows programming. Now I can have 50 or more, but that's not the point.
Also, as I thought, MSDN forgot to tell me that all the functions use WSAAPI (= __stdcall). Since the stack is managed properly now, everything works. Well, since I did try a debugger, so my time wasn't completely wasted.