473,585 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MFC ActiveX built with /CLR fails to load

Hello.
We need to use UserControl-derived components written in C# in our
existing MFC application. The components need to be inserted into
existing ActiveX controls (written using MFC and ATL as separate OCX
files). The recommended way is to turn on the /CLR switch and use
CWinFormsContro l class. Using this approach I was able to insert a
simple test component into one of our ActiveX controls and successfully
build the OCX in Debug mode, however when running the application I
noticed that it fails to load the modified ActiveX control - when the
app tries to create an instance of the control it fails with the
following error: ClassFactory cannot supply requested class. The same
load failure occurs even when I completely removed the test component
from the ActiveX control so it seems that the failure is caused by
building with the /CLR switch. I also tried to build the ActiveX's
StdAfx.cpp and the cpp file containing code for the ActiveX DLL (such
as InitInstance and DLLRegisterServ er) without the /CLR switch but it
didn't help. The control is registered properly and w/o errors (at
least that's what regsvr32 shows).

We use Visual Studio 2005, any help will be greatly appreciated. Thank
you.

Oct 15 '06 #1
0 1453

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

Similar topics

0
1225
by: James | last post by:
how come i can't print to a network printer from inside my activex dll? i load this dll in an asp page. the dll just loads a page into a webbrowser control and then trys to print it. i can call my dll from a normal vb app and it works fine. my guess is that when IIS loads the dll it is running as SYSTEM. thats why i tried to use the...
1
2951
by: Wm. Scott Miller | last post by:
I have a Custom DTS Task for SQL Server and I've got it working fine, except for when I try to access its properties from an ActiveX script. I have added a new property called Length and a method called Generate that returns a string. Whenever I get the object in the ActiveX script, the only properties and methods I can use are for the...
1
2707
by: Steve | last post by:
I am having an issue deploying an ActiveX control. This is a .NET project in C#. The ActiveX control is written in VB6. I use the PDW (Package and Deployment Wizard) to create a .CAB for the control. The problem is that sometimes the ActiveX control installs successfully and sometimes it doesn't. We have various test machines running...
5
10901
by: punchbag | last post by:
Hi all, There has recently been a new update to internet explorer whereby activex controls now load on a page unactivated. MSDN have a website explaining a workaround where you do away with the <OBJECT> tag in your html and instead use an external Javascript the control will load activated. ...
4
4843
by: | last post by:
Hi, I'm porting a Web site from 32 bit IIS 6 to x64 IIS 6 (Windows Server 2003 x64 R2) and I'm having trouble using an ActiveX object inside an ASP page (old ASP, not ASP.NET). The CreateObject call fails under x64 IIS, while is working fine under x86 IIS. I found out that the problem may be related to the fact that the ActiveX is based on...
7
5804
by: Artie | last post by:
Hi, Our team have a web project which includes some C# ActiveX DLLs. On some developers' PCs, the code which calls methods in the ActiveX dll is succesful - no exceptions. On other PCs, the ActiveX control doesn't even seem to get loaded. (On the failing machines, if we try and debug down to where the ActiveX DLL method is invoked, both...
1
2424
by: skyy | last post by:
Hi... I am creating a MFC ActiveX control porject... I would like to create a text box when the activeX object is load. How do i do it? Thanks!
8
1982
by: Daniele Piccinini | last post by:
Hi all, In my vc++ 2005 dialog based application i need to use a comunication activex component in a secondary thread: CFINSAxEFS* pNewAx = new CFINSAxEFS(); if ( !pNewAx->Create( NULL, NULL, CRect( 0,0,0,0), pParent, pNode->m_nFinsID) )
1
1091
by: krille | last post by:
Hey! Im making an activex control in .Net that will print some nametags. Problem is that i need to sign my assembly with a strong name key to bypass some scurity issues with printing so this is what i have done: I added a new key to my assemby via the signing tab in propertys (vs2005) after this the activex control dont load in IE...
0
7908
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
8199
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
8212
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
6606
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...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3835
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
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
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
1447
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.