Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Help with WinSock

Name: Anonymous 2010-02-03 13:48

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: Anonymous 2010-02-03 16:14

>>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.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List