none
UsbDevice打开大容量存储设备类的usb RRS feed

  • 问题

  • manifest中加入

        <DeviceCapability Name="usb">
          <Device Id="vidpid:2009 7638">
            <Function Type="winUsbId:9d7debbc-c85d-11d1-9eb4-006008c3a19a"></Function>
          </Device>
        </DeviceCapability>


    然后代码中

                string aqs = UsbDevice.GetDeviceSelector(8201, 30264);//VID:0x2009 PID:0x7638 Class:0x08 SubClass:0x06 Prot:50 
                //string aqs = UsbDevice.GetDeviceClassSelector(new UsbDeviceClass() { ClassCode = 0x08, SubclassCode = 0x06, ProtocolCode = 0x50 });
                var dis = await DeviceInformation.FindAllAsync(aqs);
                usb = await UsbDevice.FromIdAsync(dis[0].Id);

    依然是无法枚举出设备。

    设备已连接  USB\VID_2009&PID_7638\STM3210

    2017年11月27日 12:17

全部回复

  • 你好,

    请先确保你设备的ID是正确的。其次请尝试一下removeable cabability.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    2018年3月14日 3:54