Question
Visual Studio and Winsock vs. Winsock2
Hi Folks,
First off, I'm a Mac guy who is still relatively new to Visual Studio 2003 and 2005. I have a question that I hope is simple for someone with Visual Studio experience to answer...
I am working on a plug-in that uses sockets and I was trying to use Winsock2 instead of Winsock (I used Winsock2 in my stand-alone test application, and figured I would stick with it my plug-in). My problem is that in order to get winsock2.h to successfully load in my plug-in code (without a ton of warnings/errors), it appears that I need to load winsock2.h before windows.h. I'm not sure how to do this in plug-in code, and I am hoping someone could shed some light on this for me.
My use of sockets isn't all that complex, so maybe I'm OK with using plain old winsock. I'm just really curious how one would go about using winsock2.h in a plug-in. Should I use the WS2_32.lib with the winsock2.h header file? That seems like a bad idea, so I'm using wsock32.lib.
Any help will be greatly appreciated!!!
Cheers!
-- Jim
First off, I'm a Mac guy who is still relatively new to Visual Studio 2003 and 2005. I have a question that I hope is simple for someone with Visual Studio experience to answer...
I am working on a plug-in that uses sockets and I was trying to use Winsock2 instead of Winsock (I used Winsock2 in my stand-alone test application, and figured I would stick with it my plug-in). My problem is that in order to get winsock2.h to successfully load in my plug-in code (without a ton of warnings/errors), it appears that I need to load winsock2.h before windows.h. I'm not sure how to do this in plug-in code, and I am hoping someone could shed some light on this for me.
My use of sockets isn't all that complex, so maybe I'm OK with using plain old winsock. I'm just really curious how one would go about using winsock2.h in a plug-in. Should I use the WS2_32.lib with the winsock2.h header file? That seems like a bad idea, so I'm using wsock32.lib.
Any help will be greatly appreciated!!!
Cheers!
-- Jim
