Groups | Blog | Home
all groups > visual c libraries > september 2006 >

visual c libraries : Run-time error '429' : ActiveX can't create object


Ralph
9/5/2006 10:23:20 PM

[quoted text, click to view]

To add a control to VB open the Projects->Components (Ctrl+T).
[Be sure to go back and remove any reference to the control from
Project->References.]

-ralph

Lucy Ludmiller
9/6/2006 12:25:55 AM
Sorry about the cross posts, not sure which group is the most relevant,
since I am using C++, MFC/COM and VB6

I have written an MFC ActiveX control in C++. I want to use the control
in VB6. The component builds succesfully, and is succesfully registered
on my computer. I am able to reference it in a VB project and have the
component show in the "list of components" dialog.

I have declared my object in VB6 as this:

dim withevent m_control as MyControlLib.MyControl

I try to create an instance of it in VB6 like this:

set m_control = CreateObject("MyControlLib.MyControl")


I then get this error. Which by the way, I believe is a red herring
*i.e. misleading). The ocx is succesfully registered on my mchine, it is
on the path of my VB project and it has all the required dependencies. I
thought there may be a problem wth my control because it was quite
complicated (had a lot of C++ DLL dependencies), so I tried an MFC
control generated by the MFC wizard, and I added two methods and an
event. When i tried to use the component in VB - I had exactly the same
results.

Does anyone know how to instantiate/use an MFC activeX COM control in VB6 ?
AddThis Social Bookmark Button