Hi,
Is there any way to get the com port settings of a com port in use or not in use??? i.e. baud, parity, data bits, IRQ, Address.
Printable View
Hi,
Is there any way to get the com port settings of a com port in use or not in use??? i.e. baud, parity, data bits, IRQ, Address.
Use the Microsoft Comm Control. I beleive however this only works with ports that are opened by the application. If you are looking for getting information from a commport that is being operated from another app you may have to do something with API.
Yeah, the comm control limits me to have my app open the ports, and the number of ports that i can use with that control is 16 (or 32 I don't remember). I need to check the ports of up to 256 com ports. The actual problem is that I can get most of the data from the registry of Win NT based systems, but I couldn't find out where the information is in Win98 systems. Anyone know if there's any API's that I could use?
Check out information conecerning this API
VB Code:
Private Declare Function ConfigurePort Lib "winspool.drv" Alias "ConfigurePortA" (ByVal pName As String, ByVal hwnd As Long, ByVal pPortName As String) As Long
Maybe this will help
That API only seems to config printer ports. But thanks anyways
I found a quick comm port tutorial, but it's not all that usefull:
http://www.vbrad.com/
I also found a good listing of resources, have way down the page are bunch of software links. maybe one will help you.
http://www.lvr.com/serport.htm
I think the best solution for you would be to find a tutorial concerning the underlying api, after all the control is just a wrapper. I use to have a good link for that, but I can't seem to find it.
I would sugest using Inpout32.dll available here: http://www.logix4u.cjb.net/ and access the serial port registers directly. If needed, I may be able to supply more links about this.
kevin