473,563 Members | 2,695 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.My Control

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

set m_control = CreateObject("M yControlLib.MyC ontrol")
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 4681

"Lucy Ludmiller" <no*****@myplac e.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.My Control

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

set m_control = CreateObject("M yControlLib.MyC ontrol")
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
9058
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 could run simultaneously, but that might break Windows... ;) The problem I had was I couldn't get the files to RUN, only to OPEN. Thanks for the...
5
4964
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: exec("c/php5/php.exe path/to/script parameters &") will run the schript but will wait until the schript finished processing. exec("c/php5/php.exe...
5
1978
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 testout.php
2
9366
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 from my C: drive, File.Exists works properly and says C:\Temp\test.txt exists 2) Run from my H:\ (network) drive, File.Exists says the file doesn't...
8
11706
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 form: Application.Run(new form1)
3
1414
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 in python2.3 64 bit version
0
1673
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
7352
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). I have created a windows service from VStudio 2005 template. What is the windows service replacement for Application.Run()?
0
1827
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 Settings\Administrator.SLB_EUROPE\Desktop\norm ops 150607.xls" ' Select Asset & Portfolio Parameter sheet Sheets("Asset & Portfolio Parameter").Select ' Change the...
1
1527
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 everything works right. This new server won't run our test app. It won't run .aspx pages. It will run default.htm just fine. We cant see anything wrong...
0
7664
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7885
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.