Skip to main content

 none
deploying Winusb application in C++ RRS feed

  • Question

  • Dear All,

    I've developed a C++ console program to communicate with a microcontroller board using a Winusb template in Visual Studio 2017. My program is in 2 parts, a USB application using WindowsApplicationForDrivers10.0 platform which is a dll. The 2nd part is an exe application which calls the aforementioned dll and also uses WindowsApplicationForDrivers10.0 platform. The program works fine from within Visual Studio. I followed the procedure here to deploy:
    https://docs.microsoft.com/en-us/cpp/windows/walkthrough-deploying-a-visual-cpp-application-by-using-a-setup-project?view=vs-2019
    Unfortunately the deployed program is unable to communicate over USB on a different computer.

    Any advice?

    Thanks in advance,

    Regards,

    Alan

    Friday, November 15, 2019 10:59 AM

All replies

  • How does it fail? Does the app fail to start? Fail to open a handle?

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

    Friday, November 15, 2019 3:02 PM
  • Hi,

    Thank you for getting back to me. I have been doing my development on Windows 10 with Visual Studio 2017. I've been able to get my hands on a laptop with a fresh installation of Windows 10. I was able to add debug comments to my application and compare them to what I was seeing on my development machine.

    My USB device has 2 interfaces. I've used Microsoft OS descriptors to specify that I want to use winusb. My USB device's 2 interfaces were coming up correctly in Windows' device manager as using winusb. Upon closer examination of the registry here:
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_1FC9&PID_008A&MI_03\6&2ccef474&36&0003\Device Parameters
    I noticed that neither of my USB interfaces had DeviceInterfaceGUIDs. Once I created these keys manually, my PC application worked ok.

    Does this mean that I haven't implemented my Microsoft OS descriptors correctly?

    Thanks in advance for your comments,

    Regards,

    Alan

    Wednesday, November 20, 2019 12:58 PM
  • does your MS OS descriptor work on a different OS release (and the device interfaces are added properly)? Which version of Windows 10 are you testing on? Have you captured a USB ETW log for the first time your device is plugged in?  The MS OS descriptor is cached after the first plug in, so you need to start from a clean slate when capturing the log to see if anything is amiss in the returned MS OS descriptor


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

    Friday, November 22, 2019 5:28 PM