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