Solved

VB6 Activex Exe file causes Run-time error 429

Posted on 2014-01-12
6
969 Views
Last Modified: 2014-01-23
I have built an Activex exe file which uses MSComm & MSWinsck only. I have built an install program and run the install but when I start main program which calls this exe, I get run-time rror 429, ActiveX component can't create object.
I temporarliy installed VB6 in this PC and even when I run the app under debug mode, I get the same error and it seems to relate to MSComm or at leats that's where it stops.
Can anyone help me wit where I ma going wrong as this is first time I have built and used an ActiveX exe file.
0
Comment
Question by:mortonkr
  • 4
  • 2
6 Comments
 
LVL 16

Expert Comment

by:HooKooDooKu
ID: 39775626
I would suggest that where you are going wrong is attempting to use MSComm in a VB6 app.  The control has always been buggy and not all the member functions operate the way they are documented.

Anyone I ever knew that needed a "professional" program to utilize the COM ports has skipped the MSComm control and learned how to use the Windows API to control the COM port (which of course requires many more steps than it does with MSComm.

I never did any professional work with MSComm myself (so I don't have an example of how to use the API).  But I have programmed a home project with MSComm and found that at a minimum, the COM did not behave reliably (requiring many reboots to get the COM ports reset).


Otherwise, it is most likely that you are getting the dreaded "can't create object" because either a control is missing from the machine you're trying to run the control on, OR the version number of the control you are trying to run against is different than the version you compiled against (frequently known as DLL hell).  In the case where you are trying to run the project from the debugger and it is still failing, you would need to verify that all controls referenced by your project are on the same version number on both machines.  Actually, if the problem is with a version number of one of the controls you are referencing directly (as opposed to something that is created dynamically or is a dependancy of your dependancy) the project usually fails to properly open until you get the version numbers in sync.  I've personally had a devil of a time trying to make that happen when it turns out that you built the project using an earlier version of a control than the version on the machine you are trying to run on.  In which case, you've got to either update the control on your developement machine, or compeletely delete all traces of it (including in the registry) on the target machine so that your installer will install the older version of the control.  When the installer sees a later version of a control, it won't overwrite the newer version (under the assumption the newer one is going to be compatable).
0
 

Author Comment

by:mortonkr
ID: 39775732
Thanks for that feedback. I have up until now had success with the MSComm control but as it happens I no longer need it for this project so I removed it and recomplied the activex exe and the app exe so the only control was mswinsck.
The same error occurred...error 429!
on this particluar pc, I ran a vb6 install but selected only the activex component of the install. Once the install was complete, the app works fine!
I am not sure what part of the vb6 activex install fixed it but it did! Now I have to discover what did it so I can create the same fix on further PC's!
Any help with this would be great!
0
 

Author Comment

by:mortonkr
ID: 39775784
Further to my last response....after I installed the ActiveX component only of the VB6 install, I proceeded o uninstall it. Once complete, my app still works fine!
I ran a check over the 2 version of the registry both bfore and after VB6 install & uninstall and nothing stands out as being relevant!
Unless anyone is able to help I will just have to run through this process each time.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 16

Expert Comment

by:HooKooDooKu
ID: 39777394
If your projects only dependency is mswinsck, then I would suggest doing a full search in your computer's registry (the computer that is getting the error) and delete every registry entry that includes "MSWINSCK.OCX".  Then try rerunning your install (which I assume includes a copy of MSWINSCK,OCX).

BTW, the worst case I've faced similar to what you are facing right now is when the target machine had a slightly different version number of a control than my compile machine did, even though the GUID was identical.

For example, if you look at VBP in Notepad, you should see a line that looks something like this:
Object={248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0; MSWINSCK.OCX

I had a situation (with a different control) where that version number (#1.0#) was something like #1.1# on the target machine.  When the install would run, trying to install #1.0#, it would see the control already exists, and that the control on the target machine was a higher version number, so it wouldn't replace the control.  And for some reason, the 1.0 version in the project was incompatable with the 1.1 version on the target machine even through the GUID was the same for both controls.
0
 

Accepted Solution

by:
mortonkr earned 0 total points
ID: 39791894
Thanks HooKoo. Tried that but no change!
I went through various trials on custom installs of VB6 and discovered that installing then unintsalling the ActiveX tools fixed it! I went through the registry chnages but coundlt find anyhting obvious!
0
 

Author Closing Comment

by:mortonkr
ID: 39802552
It was just what worked even though a clumsy solution!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now