473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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 ?

Sep 5 '06 #1
1 4677

"Lucy Ludmiller" <no*****@myplace.comwrote in message
news:wc******************************@bt.com...
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
?
>
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
Sep 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: erniedude | last post by:
Hi, I'm a newbie and I was wondering if anyone knew a (Python) script to run 4 batch files, one after the other (assuming the directories are known). It would be better if all 4 batch files...
5
by: Thomas | last post by:
I am using php 5.0.4 under IIS 6 under Windows Server 2003 and want to run a php-script as a separate process. This schript dies not have any output. I tried several variants without success: ...
5
by: nephish | last post by:
hey there all, i have been looking for a way to run a php command line script from my python script. here is what i want to do: if x = 4: execute php4 testin.php else: execute php4...
2
by: Zeno Lee | last post by:
I'm using File.Exists to test a file on my C: drive. My program was strongly named and had caspol -af run on it to allow it to run from the network. There are 3 ways I am doing this: 1) Run...
8
by: Tim | last post by:
Is it possible to close the form I invoked via Application.Run() as I invoke another form without the application exiting? (I'd rather not hide it since I don't need it anymore) ....call to...
3
by: Nx | last post by:
Hello I think my question is how to make the script wait until it returns from a call to run() Here is a code snippet: # next lines calls python2.4 32 bit version # from a script running...
0
by: cn.popeye | last post by:
Use UltraEdit run Python Run UltraEdit Menu :Advanced menu/Tool Configuration command Command Line: python %n%e Working Directory:%p
28
by: | last post by:
I have a multi threaded windows form application that runs great after calling Application.Run(). Application.Run is required for a COM component I a using in the app (required for message loop). ...
0
by: modularmix | last post by:
Does anyone know how to run the Excel Macro for two different spreadsheets in parallel. Here is the code that works sequentially. Workbooks.Open Filename:="C:\Documents and...
1
by: GaryDean | last post by:
We have a new server2003 machine that was built like all the rest - IIS and everything needed to run asp.net apps. We have a test asp.net website that we use for new machines to make sure...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.