Avatar of mcgilvra
 asked on

VB6 MSCOMM Control Problem in Win7 machine

I wrote a serial communications program, named serialComm, in VB6 using the MSCOMM control.  serialComm is intended to talk to an external device, call it PLC.  The RS232 port is made with a USB/RS232 converter.

My machine is running Windows 7.  serialComm works fine on my machine, both from within VB6, and when I run the installed one outside of VB6.  But when I sent it to my customer and they installed it on their Win7 machine it does not work.  Their machine does not have VB6 installed.

The customer is using the very same USB/RS232 converter and they can communicate with the PLC via Hyperterminal.  When they run serialComm, the proper port opens and all looks good but there is simply no response from the PLC.  

We checked the RS232 transmit line (pin 3 of the 9-pin D is Tx from the PC) and when the command is sent we get a single 70 micro-second wide pulse.  It should be several bit transitions because we are sending about 9 characters.  We also checked the receive line to be sure and there was nothing on it, just flat lined.

Not sure if it matters but both machines have .NET  v4.0.30319 on them.

Any insight into this problem would be greatly appreciated.  Thank you.
Microsoft DevelopmentVisual Basic ClassicHardware

Avatar of undefined
Last Comment

8/22/2022 - Mon

Did you use an installation tool, such as the package and deployment wizard?
That should ensure that any support files are installed and registered correctly..

Yes, we used the P&D wizard.

Windows 7 32bit or 64bit?
Your help has saved me hundreds of hours of internet surfing.

64 bit on both machines.

When using the Package and Deployment Wizard included with VB6, the installer calls the 64bit version of the REGSVR (by default) to register your 32bit OCX.  (It does not know about the 32bit version in the windows\syswow64 folder because it predates VB6)

Try this.

cd \windows\syswow64
regsvr32 c:\yourOCXpath\yourOCXfilename.ocx  


In the future, I would suggest you try INNO Setup for your future distro's.. It's FREE and supports the VB6 - Windows 7


Ok, we tried it and it said it registered successfully but it does not help.  We still can't get any communications.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

Which USB/RS232 converter are you using?

Both machines using identical USB/RS232 device.  Device works fine on both machines when using Hyperterminal and other apps.
Driver: Prolific PL2303, problem machine is V1.7, my (good) machine is v1.2


I have been using Keyspan Serial Adapters on Win7 64bit machines to connect to digital LED displays on our shop floor for over a year now with no problems..  (sample code/settings provided)  Do you get any error messages? Anything in the Event Logs of target machine?  Do you have to use certain settings with your device (baud rate , parity etc.) Can you write a small debug/test program to see if and where the VB code fails?

working settings
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Dave Baldwin

I'm glad you found the problem and I agree, Prolific is hurting themselves.  Many companies that have tried to 'control' their markets have gone out of business, put there by the companies that let people use their products as they needed and wanted.

No expert pointed to the solution of using the alternate FTDI-chipset.  I found that on my own.