简体   繁体   中英

How can i established a connection between a device with a Computer Machine via USB in C#

I am new to programming and i am trying to understand how to connect an external device with a Pc via USB. Using C sharp as programming language

How can i established a connection between a device with a Computer Machine via USB in C#

It totally depends on the USB device and the driver.

If you have no driver you first will need to have/make some sort of driver in order to communicate with the USB device. This cannot be done in C#. You will need to write the driver in C or C++. Writing drivers is a very tedious task and has an enormous learning curve to it. If you are new to programming I wish you all the best. If you do decide to embark on this adventurous journey I would suggest looking for a open source general driver already written in C or C++ and see if you can expand on it.

If you do have a driver there might be some documentation of how you can interface with it to communicate with your USB device. Or you can load the DLL in your assembly and see what interface it offers.

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM