Hi,

I am writing an User Mode program to access an device connected to the USB
port. How to access it?
Can we use CreateFile,ReadFile,WriteFile functions to access it?


Narendra

Re: How to access USB port from user mode program on Win2K/XP? by Bill

Bill
Wed Jul 21 23:02:53 CDT 2004

What type of USB device is this? Very likely you will need to write a
driver for this device in order to access it. A user-mode interface for USB
devices is coming in Longhorn, but isn't available natively in Windows
today. If your device is a HID device, or belongs to a standard class (such
as a disk device) then perhaps there are existing drivers that will suffice.
Otherwise, you will need a driver.

--
Bill McKenzie
Software Engineer - Prism 802.11 Wireless Solutions
Conexant Systems, Inc.


"Narendra Kulkarni" <narendradv@hotmail.com> wrote in message
news:%23apZV45bEHA.1652@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I am writing an User Mode program to access an device connected to the USB
> port. How to access it?
> Can we use CreateFile,ReadFile,WriteFile functions to access it?
>
>
> Narendra
>
>



Re: How to access USB port from user mode program on Win2K/XP? by Narendra

Narendra
Thu Jul 22 00:01:39 CDT 2004

It is a type of HID device(touch screen) for which i have the driver. I am
writing an calibration utility as an uiser mode application. I need to get
the raw and calibrated X,Y coordinates from the touchscreen. Can anyone give
me suggestions in this regard

TIA
Narendra


Can anyone explain how to read and write data from
"Bill McKenzie" <bill.mckenzie@nospam.conexant.com> wrote in message
news:%23zC6ED6bEHA.796@TK2MSFTNGP09.phx.gbl...
> What type of USB device is this? Very likely you will need to write a
> driver for this device in order to access it. A user-mode interface for
USB
> devices is coming in Longhorn, but isn't available natively in Windows
> today. If your device is a HID device, or belongs to a standard class
(such
> as a disk device) then perhaps there are existing drivers that will
suffice.
> Otherwise, you will need a driver.
>
> --
> Bill McKenzie
> Software Engineer - Prism 802.11 Wireless Solutions
> Conexant Systems, Inc.
>
>
> "Narendra Kulkarni" <narendradv@hotmail.com> wrote in message
> news:%23apZV45bEHA.1652@TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > I am writing an User Mode program to access an device connected to the
USB
> > port. How to access it?
> > Can we use CreateFile,ReadFile,WriteFile functions to access it?
> >
> >
> > Narendra
> >
> >
>
>



Re: How to access USB port from user mode program on Win2K/XP? by Jackal

Jackal
Thu Jul 22 00:55:05 CDT 2004

You can try hclient sample code in DDK.
The sample code demonstrates how an user mode program
to communicate the HID device.
It locates in <DDK>\src\wdm\hid\hclient.

Best Regards

Jackal Huang

>-----Original Message-----
>It is a type of HID device(touch screen) for which i
have the driver. I am
>writing an calibration utility as an uiser mode
application. I need to get
>the raw and calibrated X,Y coordinates from the
touchscreen. Can anyone give
>me suggestions in this regard
>
>TIA
>Narendra
>
>
>Can anyone explain how to read and write data from
>"Bill McKenzie" <bill.mckenzie@nospam.conexant.com> wrote
in message
>news:%23zC6ED6bEHA.796@TK2MSFTNGP09.phx.gbl...
>> What type of USB device is this? Very likely you will
need to write a
>> driver for this device in order to access it. A user-
mode interface for
>USB
>> devices is coming in Longhorn, but isn't available
natively in Windows
>> today. If your device is a HID device, or belongs to a
standard class
>(such
>> as a disk device) then perhaps there are existing
drivers that will
>suffice.
>> Otherwise, you will need a driver.
>>
>> --
>> Bill McKenzie
>> Software Engineer - Prism 802.11 Wireless Solutions
>> Conexant Systems, Inc.
>>
>>
>> "Narendra Kulkarni" <narendradv@hotmail.com> wrote in
message
>> news:%23apZV45bEHA.1652@TK2MSFTNGP09.phx.gbl...
>> > Hi,
>> >
>> > I am writing an User Mode program to access an device
connected to the
>USB
>> > port. How to access it?
>> > Can we use CreateFile,ReadFile,WriteFile functions to
access it?
>> >
>> >
>> > Narendra
>> >
>> >
>>
>>
>
>
>.
>

Re: How to access USB port from user mode program on Win2K/XP? by Robert

Robert
Thu Jul 22 02:47:20 CDT 2004

Narendra Kulkarni wrote:

> It is a type of HID device(touch screen) for which i have the driver.

Now what? HID or not?

If the device identifies itself as HID mouse then no access is possible
because Windows grabs all mice (and keyboards) with an exclusive
CreateFile call.


Re: How to access USB port from user mode program on Win2K/XP? by DavidSThompson

DavidSThompson
Fri Aug 20 11:45:03 CDT 2004

From: http://www.lvr.com/hidfaq.htm

Windows 2000 and Windows XP have exclusive read/write access to HIDs that
are configured as a system keyboards or mice. An application can obtain a
handle to a system keyboard or mouse by not requesting READ or WRITE access
with CreateFile. Communications can then use HidD_SetFeature and
HidD_GetFeature (assuming the device supports Feature reports).


Re: How to access USB port from user mode program on Win2K/XP? by Robert

Robert
Fri Aug 20 13:00:42 CDT 2004

David S Thompson wrote:
> From: http://www.lvr.com/hidfaq.htm
>
> Windows 2000 and Windows XP have exclusive read/write access to HIDs that
> are configured as a system keyboards or mice. An application can obtain a
> handle to a system keyboard or mouse by not requesting READ or WRITE access
> with CreateFile. Communications can then use HidD_SetFeature and
> HidD_GetFeature (assuming the device supports Feature reports).

I know that for years, but it will not help for the original question
because i am sure he wants to get the standard position information.

Re: How to access USB port from user mode program on Win2K/XP? by Ray

Ray
Mon Aug 23 16:28:42 CDT 2004

What do you mean by "for which i have the driver"? If you've written a
HID filter driver or HID mini-driver, then what you'd typically do is
have your driver expose a device object as an API and use IOCTLs to
communication private information such as raw and calibrated positions
to your user-mode application.

Narendra Kulkarni wrote:

> It is a type of HID device(touch screen) for which i have the driver. I am
> writing an calibration utility as an uiser mode application. I need to get
> the raw and calibrated X,Y coordinates from the touchscreen. Can anyone give
> me suggestions in this regard
>
> TIA
> Narendra
>
>
> Can anyone explain how to read and write data from
> "Bill McKenzie" <bill.mckenzie@nospam.conexant.com> wrote in message
> news:%23zC6ED6bEHA.796@TK2MSFTNGP09.phx.gbl...
>
>>What type of USB device is this? Very likely you will need to write a
>>driver for this device in order to access it. A user-mode interface for
>
> USB
>
>>devices is coming in Longhorn, but isn't available natively in Windows
>>today. If your device is a HID device, or belongs to a standard class
>
> (such
>
>>as a disk device) then perhaps there are existing drivers that will
>
> suffice.
>
>>Otherwise, you will need a driver.
>>
>>--
>>Bill McKenzie
>>Software Engineer - Prism 802.11 Wireless Solutions
>>Conexant Systems, Inc.
>>
>>
>>"Narendra Kulkarni" <narendradv@hotmail.com> wrote in message
>>news:%23apZV45bEHA.1652@TK2MSFTNGP09.phx.gbl...
>>
>>>Hi,
>>>
>>>I am writing an User Mode program to access an device connected to the
>
> USB
>
>>>port. How to access it?
>>>Can we use CreateFile,ReadFile,WriteFile functions to access it?
>>>
>>>
>>>Narendra
>>>
>>>
>>
>>
>
>

--
../ray\..

Please remove ".spamblock" from my email address if you need to contact
me outside the newsgroup.