Reply
Highlighted
Posts: 13
Registered: ‎09-15-2003

Device Manager

I'm working with f321 and USBxpress in Visual Basic.
When a USB device is pluged and when an enumeration is completed - Windows add a new USB device to the Device Manager in the Control Panel.
I'm interested where changes, made by Device Manager, can be noticed; which registers change and if this registers can accessed; and also reading error codes?
Thanks in advance!




------------------
jupo78@hotmail.com
jupo78@hotmail.com
Posts: 304
Registered: ‎01-22-2001

Re: Device Manager

Hello,

When the device is enumerated on the bus it is installed in the Windows Registry according to the bus type (USB) and the device's Globally Unique Identifier(GUID). The device manager is simply a tool for safely interacting with the registry.

If you are looking for device error codes, and specifics about accessing and manipulating the Windows registry check out:
http://msdn.microsoft.com

If you are specifically interested in device manager type functions check out the DevCon SetupAPI example in the Windows XP DDK(Driver Development Kit).

The registry can be difficult to deal with, which is why USBXpress extracts the necessary product strings from the registry for you, so that you can communicate with your device. Do you have any more specifics on what you are attempting to accomplish?

Regards,
Cormac
csookram@cygnal.com
Posts: 13
Registered: ‎09-15-2003

Re: Device Manager

Thanks for tips.
Well when I use API function F32x_ResetDevice - device resets and than take some time that the host removes and adds USB device to the Device Manager. I want to know when a device and the host are ready to communicate so that I can re-open device (F32x_Open).
jupo78@hotmail.com
Posts: 304
Registered: ‎01-22-2001

Re: Device Manager

Hello,
Interfacing with the registry directly would do nothing more than what F32x_Open already does. If the device is not present then it is not enumerated in the registry and any attempts to get information from this device will fail.

The function F32x_Open will fail and give you an error code until the device becomes present. You should be able to create a loop to wait until F32x_Open succeeds and the device becomes available.

Regards,
Cormac
csookram@cygnal.com
Posts: 13
Registered: ‎09-15-2003

Re: Device Manager

I already done that - it works.
Thanks anyway!
jupo78@hotmail.com