locked
Enumerate Composite WinUSB Device for MFDeploy RRS feed

  • Question

  • I'm attempting to customize MFDeploy (for the .NET Microframeworks) to find the NETMF Debug interface on my NETMF hardware. Currently when I use the code in MFDeployEngines WinUSB driver:

    IntPtr

    devInfo = Native.SetupDiGetClassDevs(refguid, null, 0, Native.DIGCF_DEVICEINTERFACE | Native.DIGCF_PRESENT);

    Native

    .SP_DEVICE_INTERFACE_DETAIL_DATAdetail = newNative.SP_DEVICE_INTERFACE_DETAIL_DATA();

    Native.SP_DEVICE_INTERFACE_DATAinterfaceData = newNative.SP_DEVICE_INTERFACE_DATA(); interfaceData.cbSize = Marshal.SizeOf(interfaceData);

               

    Native.SetupDiGetDeviceInterfaceDetail(devInfo, refinterfaceData, refdetail, Marshal.SizeOf(detail) * 2, 0, 0))

    The interface/device instance path I get from:

    detail.DevicePath

    Seems to be indeterminate, and I only get one per device.  I will always know the InterfaceGUID and MFDeploy will always be in the first interface.

    Any help on how I can find the correct Device Instance Path?


    Kevin WOlf


    Friday, October 11, 2013 1:12 PM

All replies

  • How many are you expecting? What is the string you are getting back?

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

    Friday, October 11, 2013 2:56 PM
  • Currently my device has of three interfaces, calling the above code will only return one interface/device path on my composite device.

     

    Above is how my device looks in the registry.

    When I execute the code as outlined in my original question it returns the following path, but does not always return the same path/interface:

    Port: \\?\usb#vid_1483&pid_1012&mi_02#8&3f086a4&0&0002#{c30242c7-fb25-443b-9e7e-a4260f373982}

    As mentioned, I want to some how identify the first interface (or at least the one with the Device Interface GUID I expect "a5bcdf10-6530-11d2-901F-00C04fb951ed"

    Port: \\?\usb#vid_1483&pid_1012&MI_00#8&3F086A4&0&0000#{a5bcdf10-6530-11d2-901f-00C04fb951ed}

    Kevin...


    Kevin Wolf

    Friday, October 11, 2013 3:04 PM