01-11-2008 07:53 AM
01-11-2008 08:22 AM
01-11-2008 09:28 AM
Hi Judy,
I have only used this in XP.
You will have to poll for this, I know of no way to make it cause a callback.
If your USB device is assigned COM6 for example, then search the registry for "COM6".
On my PC it's HKLM_HARDWARE_DEVICEMAP_SERIALCOMM device/Serial2 COM6
The entry for the part is only present when the device is. I.E. When the virtual com port is unplugged, Windows removes the registery entry.
The Programmers Toolbox has functions for accesssing the registery. You can use a timer to poll or just call it on a coms error.
I use this technique to find USB virtual com ports as finding the number Windows assigns is a pain.
Hope that helps,
John
01-14-2008 08:10 AM