We are trying to develop a USB device driver(which
support bulk data transfer) and Embedded VC++
application that uses the driver. We are
using the WINCE operating system and Pocket PC SDK 2002.
The device is COMPAQ iPAQ. We are also using the Ratoc
Systems USB Host Card adapter.
A similar third party driver is available in WIN2K. In
WIN2K it is possible from the application to wait on the
GUID (which is mentioned in the .inf file) of the usb
device to know the device status. Also application can
enumerate the device to get the name of the device. The
application is able to open the device using CreateFile
function because the driver supports the
stream interface.
While designing the driver and application we couldn't
find any APIs in WINCE which support the device
enumeration from the application. It is mentioned that if
the driver is using the function ActivateDevice /
DeactivateDevice the system will notify all the
applications with a event
NOTIFICATION_EVENT_DEVICE_CHANGE and a message
WM_DEVICECHANGE will be brodcasted. I couldn't find
anything more than this in the MSDN (Oct 2001).
How could I wait on the event
(NOTIFICATION_EVENT_DEVICE_CHANGE ) or on
the message (WM_DEVICECHANGE ) in the application? Is it
possible to enumerate the device and find the device
name ? If possible how can I do that? If not
possible is there any other method to find whether
connected/disconnected device is the one which i'm
waiting for?
If you can answer these questions it will be very helpful
for us to proceed with our development. It would be nice
if you can give us some example code examples too.
|