Francois:
Thank you for the reply. I know how to find the info from
the device manager. What I really want to know is how to
code in Delphi how to enumerate the COM ports or how to
search down the registry tree.
********************************************************
On 11/9/2010 3:19 AM, Francois PIETTE wrote:
I have a USB device which works with a serial port.
When I plug it into one computer it gets assigned
to COM3. On another computer it is COM4. How can
my Delphi program tell which COM port it gets assigned
to?
Just ideas before going further:
When you look at the COM port properties using the device manager
(from control panel), do you see anything which identifies that COM
port among the others ? If yes, then your Delphi progream can
enumerate the COM ports, find the specific information and find out
which one is yours. If not, then you have to ask the user which port
it is.
Another possibility: When you connect your device, does Windows
generate an alert (A noise and/or message in the systray) ? If yes,
then there is a message broadcasted my Windows to all application when
a new device is added and your program could catch it. To use it, you
have to ask the user to plug the device after your program started so
that your program receive that message and record the new device.
Maybe this is possible to do that only at install time provided your
device get always the same COM port number.
--
[email protected]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk