none
why does the usbview sample application fail to load? RRS feed

  • Question

  • I just downloaded the Microsoft Visual Studio Community 2015 *Version 14.0.23107.0 D14REL and

    the usbview sample AP.  When I open the project, it fails with this message.  Any ideas why this isn't working and how to fix it?

    Project 'usbview' could not be loaded because it's missing install components. To fix this launch Visual Studio setup with the following selections:

    Install Visual C++ 2015 Tools for Windows Desktop

    C:\Data\Software\Microsoft\Windows-driver-samples\Windows-driver-samples-master\usb\usbview\usbview.vcxproj : error  : Exception from HRESULT: 0x80041FE2


    Monday, September 14, 2015 6:34 PM

All replies

  • you need to install the CRT on the target machine

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Doron Holan [MSFT] Tuesday, September 15, 2015 3:48 AM
    • Unmarked as answer by LeeLarson27 Tuesday, September 15, 2015 2:34 PM
    Tuesday, September 15, 2015 3:48 AM
  • Install the CRT?  A cathode ray tube?

    I actually got it to install the C++ tools, but now the build fails with

    WindowsApplicationForDrivers10.0 (not included) and I have searched a lot and found nothing to download/install (This is not for ARM) I saw a lot of issues about that.

    I modified the install to add F# and python and a few other additions, but now I get 93 compile errors.  It is like it is now compiling for a different target or something.

    • Edited by LeeLarson27 Tuesday, September 15, 2015 2:04 PM
    Tuesday, September 15, 2015 1:04 PM
  • I have tried several other sample applications (usbsamp, cdfs, bthecho) and they all fail

    some wanted

    WindowsApplicationsForDrivers10.0

    and some wanted

    WindowsKernelModeDriver10.0

    And I have search all over the Microsoft website and can't find anything like these to download

    Tuesday, September 15, 2015 2:38 PM
  • CRT == CRunTime

    it is a separate DLL (unless you use static CRT linking) that needs to be deployed along with the EXE. As for the toolsets, these are installed by the Windows 10 WDK. If you have already installed the WDK, choose it in Add/Remove programs and choose repair, restart VS and see if it solves the issue.


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, September 15, 2015 5:18 PM
  • I had downloaded an earlier version of the WDK and after I download this one, I am getting 60 compile errors.  It seems like the WDK include file is not compatible with the sample APs I download.  For example this function in display.c, generates a lot of errors

    VOID
    DisplayBillboardCapabilityDescriptor (
        PUSBDEVICEINFO info,
        PUSB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR billboardCapDesc,
        PSTRING_DESCRIPTOR_NODE StringDescs
    );

    Error C2146 syntax error: missing ')' before identifier 'billboardCapDesc' usbview c:\data\software\microsoft\windows-driver-samples\usb\usbview\display.c
    Error C2081 'PUSB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR': name in formal parameter list illegal usbview c:\data\software\microsoft\windows-driver-samples\usb\usbview\display.c
    Error C2081 'PUSB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR': name in formal parameter list illegal usbview c:\data\software\microsoft\windows-driver-samples\usb\usbview\display.c

       

    PSTRING_DESCRIPTOR_NODEStringDescs

    );

    In the usbview.h file it references a bunch of .h files, <usb.h> and the like.  Where can I find these so I can try to hunt down the issues?


    • Edited by LeeLarson27 Tuesday, September 15, 2015 8:02 PM
    Tuesday, September 15, 2015 7:56 PM
  • from where, specifically which URL, did you get the usbview sample? from the sample git repository? usb.h comes from the wdk

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, September 16, 2015 12:42 AM
  • I got the sample ap from Microsoft. I also downloaded SDKs

    I ran a program I wrote a long time ago to track down the .h files included to try to isolate the error.

    It seems like the .h files do not have all of the classes used by the AP.  So I wrote some additional classes and deleted some of the code for non-existant superspeedplus endpoint and it is closer to working, but I am now getting error C1190, and if I turn on run time support (/CLR), I get error D4085.

    Thursday, September 17, 2015 4:05 PM
  • I found the same ap in the windows 8.1 samples and that one builds and runs fine, so I will abandon the one that came with studio 15.
    Friday, September 18, 2015 1:45 PM
  • I had the same problem with various versions of Visual Studio and WDK.  Eventually when I looked at the paths for Include Directories (under Configuration Properties/VC++ Directories) I saw a mishmash of conflicting paths.  I tried to manually fix these paths, wandered into the ugly details of "Evaluated Values" and "Inherited Values" and Macros, looked inside the registry and decided what's happening is as Microsoft is installing Visual Studio it's trying to consolidate paths from various toolsets and it's messing it up royally.  No wonder so many people are having these problems.  Most people already have some kind of a development environment, some flavor of Visual Studio or WDK, when they install Visual Studio 2015.  And Microsoft can't handle the various permutations.

    So I figured I'll start with a fresh system to test my theory: this is a brand new, virgin system.  No previous versions of WDK or Visual Studio.  I first ran Windows Update so that Visual Studio wouldn't mess itself up in attempting to run updates of its own in the middle of its install.  Then I installed Visual Studio.  In the first attempt usbview didn't compile.  I looked at the toolset used (under Configuration Properties/General/Platform Toolset) and realized it was WDK 8.1.  So I changed it to Visual Studio 2015 (v140) which you can find in the pulldown.  That fixed the problem.   After I changed ZI to Zi (C/C++ /All Options/ Debug Information Format) and Gm to Gm- (Enable Minimal Rebuild), it compiled, linked and ran without an error.

    So many people have had problems with the same thing I thought I'd share what worked for me.  Good luck!

    Thursday, October 22, 2015 8:07 AM