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!
ismohamedAsked:
Who is Participating?
 
mcriderConnect With a Mentor Commented:
Sorry, that reference came DIRECTLY from the microsoft VISUAL BASIC page:

INFO: Troubleshooting Tips for the MSComm Control
http://support.microsoft.com/support/kb/articles/Q143/1/13.asp 
 


Try this (it's 16-bit, you need to use the 32-bit APIs):

SAMPLE: Program Example for COM Port Support in Visual Basic
http://support.microsoft.com/support/kb/articles/Q140/8/80.asp 
 


Cheers!

0
 
mcriderCommented:
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!

0
 
mcriderCommented:
By the way, the sample is called Ttychic.exe

Cheers!
0
 
ismohamedAuthor Commented:
The sample at the microsoft homepage, is written in C++!
That ain't my strenght!!
I need something for VB!
0
All Courses

From novice to tech pro — start learning today.