|
-
May 4th, 2004, 06:58 AM
#1
Thread Starter
Member
Getting Com Port Settings
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.
Dave 
-
May 4th, 2004, 08:13 AM
#2
Addicted Member
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.
-
May 4th, 2004, 08:24 AM
#3
Thread Starter
Member
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?
Dave 
-
May 4th, 2004, 08:39 AM
#4
Addicted Member
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
-
May 4th, 2004, 08:51 AM
#5
Thread Starter
Member
That API only seems to config printer ports. But thanks anyways
Dave 
-
May 4th, 2004, 11:08 AM
#6
Hyperactive Member
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.
-
May 4th, 2004, 11:18 AM
#7
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
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|