Getting handle to USB device using createfile

Hi All,

Can we get handle to a USB device through CreateFile() as we do for COM
port.

Are there any special structures to do USB programming.

Any information would be helpful,
Thanx in advance.

Regards,
Kedar.

I want to know it, if there are any answers ,please mail to me.
Thank you very much.

-----Original Message-----
From: kedar [mailto:xxxxx@hotmail.com]
Sent: Sunday, June 08, 2003 6:07 PM
Subject: Getting handle to USB device using createfile

Hi All,

Can we get handle to a USB device through CreateFile() as we do for COM
port.

Are there any special structures to do USB programming.

Any information would be helpful,
Thanx in advance.

Regards,
Kedar.

kedar wrote:

Can we get handle to a USB device through CreateFile() as we do for COM
port.

Are there any special structures to do USB programming.

There isn’t (right now, at any rate) any sort of generic driver for
USB-type devices. Therefore, there isn’t any standard way of opening
handles in user-mode programs to access them.

If your USB device is of a type that has a standard driver (such as HID,
or audio, or something like that), there may also be a standard way to
access it from user mode. So tell us more about your device…


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com

Dear Walter Oney,

My device is just a generic USB device, to which a standard driver can be
loaded.

Regards,
Kedar.

kedar wrote:
> Can we get handle to a USB device through CreateFile() as we do for COM
> port.
>
> Are there any special structures to do USB programming.

There isn’t (right now, at any rate) any sort of generic driver for
USB-type devices. Therefore, there isn’t any standard way of opening
handles in user-mode programs to access them.

If your USB device is of a type that has a standard driver (such as HID,
or audio, or something like that), there may also be a standard way to
access it from user mode. So tell us more about your device…


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com

kedar wrote:

My device is just a generic USB device, to which a standard driver can be
loaded.

There *is* no “standard driver”. You’ll have to write one, in which case
you’ll call CreateFile using whatever symbolic link or registered
interface you define in your AddDevice function.


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com

You can use USBIO which is a generic USB driver. It allows you to open a
handle and to communicate with the device. It works with any USB device.

Check out http://www.thesycon.de/usbio/eng/dl_usb_l.htm
It is free.

Udo Eberhardt
Thesycon GmbH

kedar wrote:

Hi All,

Can we get handle to a USB device through CreateFile() as we do for COM
port.

Are there any special structures to do USB programming.

Any information would be helpful,
Thanx in advance.

Regards,
Kedar.


You are currently subscribed to ntdev as: xxxxx@thesycon.de
To unsubscribe send a blank email to xxxxx@lists.osr.com

Udo Eberhardt
Thesycon GmbH, Germany

xxxxx@thesycon.de
www.thesycon.de