|
-
Nov 30th, 2007, 11:34 AM
#1
Thread Starter
Frenzied Member
Error 429 - ActiveX component can't create object
I don't have this problem on my machine, but when testing the installation on another machine (well Virtual PC) i get the error:
Error 429 - ActiveX component can't create object
I know what this error means, but I don't know why I am getting it.
I have the following code in my MDIForm Load, which refers to a dll (vbsystraytools.dll) and after checking on Virtual PC, this dll is in the system32 folder and I assume it's registered (not quite sure how to check this).
BTW: lngSysTray is a registry value for the option of minimising to the system tray
Code:
'Declarations
Public WithEvents mobjSysTray As vbSysTrayTools.SysTray
'Form_Load
Set mobjSysTray = New vbSysTrayTools.SysTray
Set mobjSysTray.ImageList = imgMO
With mobjSysTray
.Icon = 1
.Menu.Add "Show", "SHOW"
.Menu.Add "Hide", "HIDE"
.EnableMenu = True
End With
If lngSysTray = 1 Then
mobjSysTray.Visible = True
Else
mobjSysTray.Visible = False
End If
-
Nov 30th, 2007, 12:03 PM
#2
Re: Error 429 - ActiveX component can't create object
It means it cant create either the mobjSysTray object or some other object that you may have coded. Can you step through the code and find the offending line?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 30th, 2007, 12:07 PM
#3
Thread Starter
Frenzied Member
Re: Error 429 - ActiveX component can't create object
Not really because I don't get this error when running it in the IDE.
Just a thought, but the dll file is located in a different place on my work PC, i.e. not in the system32 folder as it is on the virtul HD. Would this make any difference?
I would guess not, but just in case
-
Nov 30th, 2007, 12:17 PM
#4
Re: Error 429 - ActiveX component can't create object
 Originally Posted by aikidokid
I assume it's registered (not quite sure how to check this).
Did you install it? or run RegSvr32 on it?
If you didn't do either, it isn't installed - so run RegSvr32 (open a command prompt, then type RegSvr32 followed by the full path and filename).
Note that it is safe to re-register something that is already registered (it just confirms the registry entries etc), so you can do it anyway.
-
Nov 30th, 2007, 12:23 PM
#5
Re: Error 429 - ActiveX component can't create object
Just a note. On virtual pc, I will simply drop a dll or ocx I want to test in the same folder as the project. Register it as si_the_geek recommends, then unregister when done testing.
-
Nov 30th, 2007, 12:34 PM
#6
Thread Starter
Frenzied Member
Re: Error 429 - ActiveX component can't create object
ok will give it a go, but shouldn't have the installation package have registered it?
-
Nov 30th, 2007, 12:39 PM
#7
Re: Error 429 - ActiveX component can't create object
If it was part of an installation package you ran, it should have been registered - unless you somehow added it as "do not register".
Do you have error handlers in your program? If so, simply add a call to the Erl function in your message (eg: MsgBox "Error " & err.number & " on line " & Erl ": " & err.description ), and number your lines - which you can do with a single click with MZTools (link in my signature).
You should then be able to tell exactly where the error is, and thus hopefully be able to tell exactly what is causing the problem.
-
Nov 30th, 2007, 06:52 PM
#8
Re: Error 429 - ActiveX component can't create object
Post the line where you include this file in your installation script.
-
Dec 1st, 2007, 10:07 AM
#9
Thread Starter
Frenzied Member
Re: Error 429 - ActiveX component can't create object
 Originally Posted by randem
Post the line where you include this file in your installation script.
Code:
Source: C:\Documents and Settings\Andrew\My Documents\VB6\MO\Inno\Copy dll files\vbsystraytools.dll; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
 Originally Posted by si_the_geek
MZTools (link in my signature).
Aready got it thanks 
 Originally Posted by si_the_geek
You should then be able to tell exactly where the error is, and thus hopefully be able to tell exactly what is causing the problem.
OK, added lines, recompiled and run the setup on Virtual PC.
The error is on this line
Code:
Set mobjSysTray = New vbSysTrayTools.SysTray
which refers to the vbSysTrayTools.dll.
The dll file is registered and resides in the system32 folder.
I do have the original project that was compiled into this dll file. Would it be better to just compile the project in with my project?
-
Dec 1st, 2007, 11:55 AM
#10
Re: Error 429 - ActiveX component can't create object
That line from your script looks fine to me - hopefully someone who uses Inno Setup will be able to confirm.
I'm not sure what the problem is, and it may actually be within the DLL itself. To find the actual cause, I'd recommend adding similar error handling to the DLL, and seeing if that is the case (even if it isn't, the error handling could well be useful later).
Adding the project within yours may not help, but then again it might - so it would be a valid way to go.
-
Dec 1st, 2007, 12:02 PM
#11
Thread Starter
Frenzied Member
Re: Error 429 - ActiveX component can't create object
 Originally Posted by si_the_geek
That line from your script looks fine to me - hopefully someone who uses Inno Setup will be able to confirm.
It installs the dll file in the System32 folder and it is registered.
 Originally Posted by si_the_geek
I'm not sure what the problem is, and it may actually be within the DLL itself. To find the actual cause, I'd recommend adding similar error handling to the DLL, and seeing if that is the case (even if it isn't, the error handling could well be useful later).
I have run the dll code in the vbSysTrayTools.vbp and added my exe and it works just fine.
I have registered the dll on my PC and the dll works as expected when using VB6 and running my project.
How do you mean adding error handling to the dll. It has 4 classes and 2 modules. Where would I begin
 Originally Posted by si_the_geek
Adding the project within yours may not help, but then again it might - so it would be a valid way to go.
I have tried this but got stuck at the first hurdle
See my question here. Post #11
-
Dec 1st, 2007, 12:14 PM
#12
Re: Error 429 - ActiveX component can't create object
 Originally Posted by aikidokid
How do you mean adding error handling to the dll. It has 4 classes and 2 modules. Where would I begin 
Like for any error handling - simply add an error handler to each sub/function. As you have MZTools, it'll just be one click per routine. 
It will probably work if you simply remove the DLL (AKA project) name, and just use the Class name, eg: ".. As SysTray"
-
Dec 1st, 2007, 12:43 PM
#13
Thread Starter
Frenzied Member
-
Dec 1st, 2007, 01:05 PM
#14
Re: Error 429 - ActiveX component can't create object
There's no need to write it out! Just go into MZTools options, select the "Error Handler" tab and enter a template like this (but altered to suit your own method/style!):
Code:
On Error GoTo ErrorHandler:
{PROCEDURE_BODY}
ErrorHandler: '** Error handler **
If Err.Number <> 0 Then
Call MyErrorHandlingSub("{PROCEDURE_NAME}")
End If
'tidy up:
'(tidy-up code for the routine here [close files, etc])
(the bits inside {} are things MZTools will fill-in for you, there's a list above the edit area)
Once you have the template, it is just one click to add it (including the bits filled in as apt) around the code of whatever routine you are in. Nice!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|