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

USBNotifier constructor should not need a Control parameter #11

Open
GoogleCodeExporter opened this issue Jun 9, 2015 · 2 comments
Open

Comments

@GoogleCodeExporter
Copy link

Its cumbersome to need a Windows Forms element in order to use USBNotifier.
Other libraries such as LibUsDotNet accomplish the same thing without needed a
Control element.

Original issue reported on code.google.com by navneet....@gmail.com on 23 Feb 2015 at 5:04

@andrasfuchs
Copy link

Sorry, my #17 is a duplicate of this.

He is right, it is implemented in LibUsbDotNet in its WindowsDeviceNotifier.

@madwizard-thomas
Copy link
Owner

You will always need a window one way or another because the attach and removal events use window messages. LibUsbDotNet seems to create its own window but you will still need a message loop to ensure the window messages are passed to the WndProc. I don't think LibUsbDotNet supplies the message loop, it might still not work for a console application. You probably would need a separate thread that handles the message loop. I'm not sure if WinUSBNet should create such a thread or leave it up to the user.
I'll see if I can support this but don't know if I'll have the time for it.

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

No branches or pull requests

3 participants