usbeject
usbeject copied to clipboard
"Additional information: The supplied user buffer is not valid for the requested operation"
When attempting to use this on Windows 10 64 bit I get an exception:
System.ComponentModel.Win32Exception occurred ErrorCode=-2147467259 HResult=-2147467259 Message=The supplied user buffer is not valid for the requested operation NativeErrorCode=1784 Source=UsbEject StackTrace: at UsbEject.Library.DeviceClass.get_Devices() in usbeject-master\DeviceClass.cs:line 89 InnerException:
I believe this stackoverflow question maybe related: http://stackoverflow.com/questions/30981181/c-sharp-usb-driver-from-c-setupdigetdeviceinterfacedetail
It also not working on Win 32 bit using AnyCpu build. The message is: The supplied user buffer is not valid for the requested operation
I have uncommented few lines from DeviceClass, that been commented in last commit and it starts work using x86 build.
I think, that the problem is in 120 line of DeviceClass.cs:
var strPtr = new IntPtr(buffer.ToInt64() + 4);