Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Additional information: The supplied user buffer is not valid for the requested operation" #4

Open
MrChriZ opened this issue Nov 25, 2015 · 2 comments

Comments

@MrChriZ
Copy link

MrChriZ commented Nov 25, 2015

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:

@MrChriZ
Copy link
Author

MrChriZ commented Nov 25, 2015

I believe this stackoverflow question maybe related:
http://stackoverflow.com/questions/30981181/c-sharp-usb-driver-from-c-setupdigetdeviceinterfacedetail

@kami4ka
Copy link

kami4ka commented Mar 7, 2018

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants