windows.h and winsock2.h


  • Following the sample for iocp in the latest SDK (Feb 2008), I tryed to move that code into a DLL project.
    I have to include <windows.h> in order to compile the DLL entry function (something the wizard didn't generate btw), and according to MSDN I need to include <winsock2.h> to make my winsock calls. However, when I compile I get a large amount of redefintion errors originating from conflicts between winsock.h and winsock2.h. Evidently windows.h includes winsock.h.
    What's the deal with these two headers?

    Thursday, May 08, 2008 2:59 PM


All replies