Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 MSCOMM Port 20 Can't Connect 1

Status
Not open for further replies.

DocJC

Technical User
Mar 20, 2007
6
US
Help!
I'm using VB6, and am trying to use MSCOMM to connect to a USB to SERIAL Port, COM20.
VB6 Won't connect to it!
Device Manager lists it as Com20.
A port enumerator lists Com20 as present.
WIN XP Hyperterminal can connect to it, and show the data I'm uploading from a microcontroller.

I am trying to use VB6 to read and process the data from the microcontroller. I have used MSCOMM before, always with low port numbers, eg COM2, and it works fine.

The USB to Serial module is a FTDI UB232R which uses the FT232RQ, and I am using the new, combined driver, 2.00.

>>> VB6 doesn't seem to find the higher ports! <<<

Have others seen this problem? Is there a solution?
Thank you,
JC
 
>Have others seen this problem? Is there a solution?

It is documented

MSComm Help file said:
CommPort Property
You can set value to any number between 1 and 16

In other words, the MSComm control cannot access ports above 16


 
Thanks Strongm,
I've seen the ref for 1 - 16 in the MS literature. I've heard report, however, of people routinely using MSCOMM for higher port numbers, up to 99 ! Hence my concern over why I can't seem to do this...
I did a VB6 Service Pack upgrade, did not make any difference...
I was hoping someone might confirm that they have used higher ports with MSCOMM on VB6.
JC
 
See this link- HID may be the answer



I haven't looked at the code, yet, though.

-David
2006 & 2007 Microsoft Most Valuable Professional (MVP)
2006 Dell Certified System Professional (CSP)
 
There is no official way of getting more than 16 ports out of the MSCOMM.

There is a hack that allows access to additional ports which involves using a hex editor to modify the OCX's binary code ...

Look for the following unique three bytes sequence in the OCX: 3D 10 00

The middle byte, 10, represents the upper port limit (i.e 16 ports). You can change this to something you like better; 99 would be 63.

 
Thank you, both!
I'll add the USB page to my info sources.
I'll give the hack a try, it sounds like just what I need!
Thank you again, I was hitting a road block without this access!
JC
 
Sorry, I was out of town for the week, and haven't had time to try it. My last Hex editor ran under DOS..., will have to look for a freeware/shareware editor to give it a try.
JC
 
April 9th, 07
Hello Strongm,
I did the ocx hack and IT WORKS GREAT!!!
I'm back in business.
Thank you very much!
JC
 
I just found this post after experiencing the same limitations with MSComm. However, I'm not sure which OCX file I should be updating. I am running VB6 on WinXP, can you tell me which file I should be updating?

Thanks a lot,
MG
 
May 15th, 07
Hello MG,
ON my Win XP system it is:
C:\windows\system32\mscomm32.ocx

The hack is as listed above.

I hope this is helpful.
JC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top