WinUSB support for many-to-many App-Device mapping

I am considering WinUSB as an alternative to writing a custom driver to talk to my USB device. In the WinUSB doc, I noticed this statement:

“The WinUSB API lets only one application at a time communicate with the device. If more than one application must be able to communicate concurrently with a device, you must implement a function driver.”

My question is how to interpret this one-app-to-one-device limitation in this statement.
Does ?the device? mean ?one particular device? with a certain pair of VID and PID? In my mind, this does not exclude multiple applications communicating with multiple devices as long as there are only one-to-one mappings from application to device. Multiple apps to one particular device is obviously not supported and probably not required in many use cases.
My key question is: If I have multiple SKUs of a same device with different PIDs (under the same VID), is WinUSB able to allow multiple concurrent instances of application to access these devices (one app instance to one PID SKU device)?

Thanks for your time and I appreciate your input.

Charles

Yes, that will work. The doc is saying what you inferred, that only one app can open a handle to a particular device instance

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Monday, July 12, 2010 11:49 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] WinUSB support for many-to-many App-Device mapping

I am considering WinUSB as an alternative to writing a custom driver to talk to my USB device. In the WinUSB doc, I noticed this statement:

“The WinUSB API lets only one application at a time communicate with the device. If more than one application must be able to communicate concurrently with a device, you must implement a function driver.”

My question is how to interpret this one-app-to-one-device limitation in this statement.
Does ?the device? mean ?one particular device? with a certain pair of VID and PID? In my mind, this does not exclude multiple applications communicating with multiple devices as long as there are only one-to-one mappings from application to device. Multiple apps to one particular device is obviously not supported and probably not required in many use cases.
My key question is: If I have multiple SKUs of a same device with different PIDs (under the same VID), is WinUSB able to allow multiple concurrent instances of application to access these devices (one app instance to one PID SKU device)?

Thanks for your time and I appreciate your input.

Charles


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

xxxxx@yahoo.com wrote:

I am considering WinUSB as an alternative to writing a custom driver to talk to my USB device. In the WinUSB doc, I noticed this statement:

“The WinUSB API lets only one application at a time communicate with the device. If more than one application must be able to communicate concurrently with a device, you must implement a function driver.”

My question is how to interpret this one-app-to-one-device limitation in this statement.
Does ?the device? mean ?one particular device? with a certain pair of VID and PID?

It means one specific hardware instance – one USB slot. If you have
three identical USB devices plugged in, each one can be used by a
different application.

In my mind, this does not exclude multiple applications communicating with multiple devices as long as there are only one-to-one mappings from application to device. Multiple apps to one particular device is obviously not supported and probably not required in many use cases.

Correct.

My key question is: If I have multiple SKUs of a same device with different PIDs (under the same VID), is WinUSB able to allow multiple concurrent instances of application to access these devices (one app instance to one PID SKU device)?

The VIDs and PIDs don’t enter into it. Your INF file matches a certain
set of USB device IDs. Any ID matched by your INF can be driven by
WinUSB using the same GUID. Only one application can handle each piece
of hardware, but if there are N pieces of hardware plugged in that match
your INF, each one can be driven by its own application.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Doron and Tim. Very much appreciated it.

Charles