i can't read out the SymbolicName from the LibUsb. This is some example code:
static void Main(string[] args)
{
var devs = UsbDevice.AllDevices;
foreach (UsbRegistry usbRegistry in devs)
{
String name = usbRegistry.SymbolicName;
}
Console.ReadLine();
UsbDevice.Exit();
}
The string name does not contain the right symbolic name. I have no idea why.
The problem seems to be in the LibUsbRegistry.cs. The function:
internal ErrorCode GetCustomDeviceKeyValue(SafeFileHandle usbHandle, string key, out byte[] propData, int maxDataLength)
calls the LibUsbDriverIO.UsbIOSync whith the Parameter: LibUsbIoCtl.GET_CUSTOM_REG_PROPERTY and in the LibUsbDriverIO.cs the function UsbIOSync calls the Kernel32.DeviceIoControlAsObject. This function return false.
Some Code:
LibUsbRegistry:
bool bSuccess = LibUsbDriverIO.UsbIOSync(usbHandle,
LibUsbIoCtl.GET_CUSTOM_REG_PROPERTY,
bytesReq,
bytesReq.Length,
gcbytesReq.AddrOfPinnedObject(),
bytesReq.Length,
out iReturnBytes);
LibUsbDriverIO:
!Kernel32.DeviceIoControlAsObject(dev, code, inBuffer, inSize, outBuffer, outSize, ref ret, deviceIoOverlapped.GlobalOverlapped)
The problem just appears with the LibUsbIoCtl.GET_CUSTOM_REG_PROPERTY. But this all is precompiled code from LibUsb .. so why is't it possible to read out the symbolic name.