Link to home
Start Free TrialLog in
Avatar of ismohamed
ismohamed

asked on

Mscomm ComPort 17

Hi,
I can see in the help file that at DESIGN time it is only possible to open comPort 1 to 16!
Well I Want to open Comport 17. I guess I have to set it in RUNTIME then.
If I try to to this :
Mscomm.CommPort = 17, then I get this error :
8002 Invalid Port Number!!

Is it not possible by the Mscomm to open a port that is greater than 16???
How should I do it then? I can see that my hyperterminal can open COM17, What special do they do?
Pleaz help me!
Avatar of mcrider
mcrider

This is a direct quote from the microsoft help pages for the MSComm Control:

"You can set value to any number between 1 and 16 at design time (the default is 1). However, the MSComm control generates error 68 (Device unavailable) if the port does not exist when you attempt to open it with the PortOpen property."

You can only set up to 16 with this control.  You will have to use API's to open above 16.

There is a sample of using the API at:

SAMPLE: December 1994 Microsoft Systems Journal Code
http://support.microsoft.com/support/kb/articles/Q122/2/74.asp 
 

Cheers!

By the way, the sample is called Ttychic.exe

Cheers!
Avatar of ismohamed

ASKER

The sample at the microsoft homepage, is written in C++!
That ain't my strenght!!
I need something for VB!
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

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