How do you determine which serial ports are installed and activated via the BIOS on a typical computer. For example, a computer could have two serial communication ports and only have one of them enabled via the BIOS setup menu. Another situation might be that a PCI circuit card has been installed on a computer with two additional serial ports that are activated however one of the serial ports on the motherboard is not enabled (i.e. COM1, COM3, and COM4 exist but not COM2).
I know how to communicate with a serial port via the CreateFile API which requires as an input parameter "COM1", "COM2", etc.
It seems 'inefficient' to create a loop that attempts to do a CreateFile to 'COM1', 'COM2', 'COM3'....and of course at what point do you stop.
Is there a device list that I can access to check each device to see if it is a serial communication device...and then grab it's identifier (i.e. COM1, COM2, .etc) which is then used via the CreateFile API to establish communiction with the port?
I'm sure accessing sometype of 'device list' will be helpful to me in the future and others that read this newgroup.
Thanks for the help./jbs
I know how to communicate with a serial port via the CreateFile API which requires as an input parameter "COM1", "COM2", etc.
It seems 'inefficient' to create a loop that attempts to do a CreateFile to 'COM1', 'COM2', 'COM3'....and of course at what point do you stop.
Is there a device list that I can access to check each device to see if it is a serial communication device...and then grab it's identifier (i.e. COM1, COM2, .etc) which is then used via the CreateFile API to establish communiction with the port?
I'm sure accessing sometype of 'device list' will be helpful to me in the future and others that read this newgroup.
Thanks for the help./jbs