Link to home
Start Free TrialLog in
Avatar of rossmcm
rossmcmFlag for New Zealand

asked on

Identifying which COM port has been assigned to a USB-to-serial adapter based on the FTDI chip

We have a legacy product that uses a USB-to-COM port chip from FTDI to provide a COM port that our app (written in D5) can use.  What I am wanting to do is to identify at run-time what COM port the FTDI device has been assigned to so that I can relieve the user of the need to look in device manager and set the COM port accordingly.  I will also hook into the message that fires when a USB device change is detected and use that to re-assign the COM port on the fly.

I'm just wondering where the proper place to poke around is to get the COM port number - the registry seems the most likely candidate - but there seem to be several registry entries that have the COM port in them, but some of them are there even when the device isn't plugged in.

I realise it's not too much to do with Delphi but it seemded like a good place to ask.
 
ASKER CERTIFIED SOLUTION
Avatar of robert_marquardt
robert_marquardt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial