locked
Can enumerate device, but it always comes back null

    Question

  • Well, been testing with the WinUSB driver, as there is something I need to do with it.

    While testing in a desktop app, using WinUsbNet, I've been able to comunicate with the device, and there I went to the store apps to do the same, and this is where this problem appeared.

    I've added the device in the manifest already using vidpid + winUsbId.

    This is the code giving me problems:

    Guid guid = new Guid("e8fdcb32-b537-4746-a29b-ff384eb06cc1");
     
               string aqs = UsbDevice.GetDeviceSelector(guid);
     
               var myDevices = await Windows.Devices.Enumeration.DeviceInformation.FindAllAsync(aqs);
                   
              
               UsbDevice device = await UsbDevice.FromIdAsync(myDevices[0].Id);

    It all goes fine, untill the last line. I can see that the myDevices has indeed 1 device, and I can access it's ID, but the device variable always comes out null.

    I was also expecting a user prompt to allow connection to the device, but it also never comes. What am I missing?


    • Edited by NunoQuintas Thursday, January 30, 2014 4:25 PM typos
    Thursday, January 30, 2014 4:23 PM

All replies