WillemM Posted March 2, 2003 Posted March 2, 2003 Anyone know how to open an USB port in C# for I/O ? I read somewhere that it has something to do with the windows API function CreateFile. If someone can tell me what the path is to the usb port, it would be of great use. Quote
FootFunk Posted April 15, 2003 Posted April 15, 2003 I am looking for the same info (plus some more details). As far as what you're looking for you might want to look at: http://groups.google.com/groups?q=.net+usb+devices&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=uHg0jn8BCHA.1576%40tkmsftngp04&rnum=1 If you find any more information on USB support in .Net please contact me. Thx. Quote
*Gurus* Derek Stone Posted April 15, 2003 *Gurus* Posted April 15, 2003 http://www.intel.com/intelpress/usb/examples/index.htm Intel provides examples for Visual Basic 6 which, depending on your level of experience with .NET, would be fairly easy to translate in a days work. Quote Posting Guidelines
Mandrake Posted April 28, 2003 Posted April 28, 2003 More trouble than its worth ??? Hi, Youd have to use COM Interop and define all the signatures, convert the types and manage the objects. So its probably more work in C#.... Mandrake Quote
*Gurus* Derek Stone Posted April 28, 2003 *Gurus* Posted April 28, 2003 It's hardly that complicated. Accessing the USB port does not require COM interoperation, just some simple calls to the Win32 API. Quote Posting Guidelines
Liqdfire Posted April 30, 2003 Posted April 30, 2003 could someone post some examples please ?? Quote
WillemM Posted May 1, 2003 Author Posted May 1, 2003 If you got a standard comport wrapper. Strip the SetCommDCB, GetCommDCB and the DCB Settings from it. And simply use as portname: \\\.\\[usbdevice] (replace [usbdevice] for the devicename). Very simple :) if you want to create a wrapper with some functionallity for e.g. mass-storage or imaging, you will have to use the intel samples and all other documents listed in this thread. Quote
Liqdfire Posted February 23, 2004 Posted February 23, 2004 If you got a standard comport wrapper. Strip the SetCommDCB, GetCommDCB and the DCB Settings from it. And simply use as portname: \\\.\\[usbdevice] (replace [usbdevice] for the devicename). Very simple :) if you want to create a wrapper with some functionallity for e.g. mass-storage or imaging, you will have to use the intel samples and all other documents listed in this thread. Thx I already have a working class for dealing with DB9 Serial Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.