locked
After upgrading to Build 8400, winsock2.h is nowhere to be found in the system

    Question

  • I was using Build 8250. I was able to include <winsock2.h> and use it in

    WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP  mode, provided, I added: WSock32.Lib from 

    C:\Program Files\Windows Kits\8.0\Lib\win8\um\x86 area. The win32 socket just worked in my Metro App-in-Desktop-mode.

    I upgraded my machine to Build 8400. It installed OS cleanly. I also downloaded and installed win8express_full.exe.

    Now my project does not build.

    C:\Program Files\Windows Kits\8.0\Include\um  contains only winsock.h.  winsock2.h is no where to be found in my system.

    The lib area: C:\Program Files\Windows Kits\8.0\Lib\win8\um\x86 does not contain WSock32.Lib as it did in my last setup against Build 8250.

    Any way I can revive my build - a Metro App working as DesktopApp using Desktop apis in Build 8400?

    Please help.

    Wednesday, June 6, 2012 9:07 PM

Answers

  • Are you trying to build a Metro style app or a Desktop app?

    Visual Studio 2012 Express can be used only for Metro style apps. To build a Desktop app you will need to use one of the full versions of Visual Studio 2012.

    You cannot use desktop family libraries such as winsock in Metro style apps.

    --Rob

    Thursday, June 7, 2012 2:55 AM
    Owner

All replies

  • My current IDE is Express 2012 RC for Windows 8.

    For Build 8250, the IDE was 2011 Beta.

    Are there multiple flavors of Express 2012 IDE?


    sua

    Wednesday, June 6, 2012 10:00 PM
  • Are you trying to build a Metro style app or a Desktop app?

    Visual Studio 2012 Express can be used only for Metro style apps. To build a Desktop app you will need to use one of the full versions of Visual Studio 2012.

    You cannot use desktop family libraries such as winsock in Metro style apps.

    --Rob

    Thursday, June 7, 2012 2:55 AM
    Owner
  • Thanks David and Rob. Yes, that was the case - I needed non Express IDE (Pro or UC). -Shafiq

    sua

    Saturday, June 9, 2012 8:33 PM
  • Though winsock2.h is a system API but it becomes available when you install Visual Studio. In OS build 8250 and 8400 both allow to use winsock2.h but it depends on your application type(metro style or desktop).

    Visual Studio 2012 Express RC can be used only for Metro style apps.So when you install it only make available those API which can be used only in metro style.

    If you install Visual Studio 2012 Ultimate RC at Windows 8 (build 8400 or build 8250) you can see that winsock2.h is available at following directory.

    C:\Program Files\Windows Kits\8.0\Include\um

    So system APIs which will be available it depends on the version of Visual Studio not on the OS build. Because VS creates the development environment and it creates this directory (Windows Kits\8.0\Include\um).

    Monday, July 16, 2012 3:32 AM