Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
0 down vote favorite

 
I will go deeper i am creating MFC ActiveX Control. After that i am adding ATL Simple Object or ATL Control next i am building an empty project only, i am building the project. regsvr32 "ActiveXControl.ocx" i am registering the ActiveX Control, next i am creating new project in C# add references in COM objects and i am doing simple Number n = new Number(); create an object instance and here i am getting this error message(I am sorry for that spelling) i am fed up with this problem.
 
Retrieving the COM class factory for component with CLSID {92887769-9BA7-4A61-914E-7D66341A4AC6} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).
 
P.S. Please help me i am stuck on this problem more than two weeks guys help please.
 
[edit author="RJM"]Removed obscenity and redundant e's.[edit]
Posted 3-Sep-12 5:27am
Edited 3-Sep-12 7:56am
(no name)406.2K
v2
Comments
Wes Aday at 3-Sep-12 10:38am
   
And what? You do not know what the error means? You can't find that CLSID in the registry?
Achi Mezvrishvili at 3-Sep-12 13:17pm
   
Of course i know what the error means ?! I have found CLSID record in the registry and it exist so what ? :)
 
Thnks for the interest you have shown.
Achi Mezvrishvili at 4-Sep-12 3:32am
   
but i have got the same problem (:
cariolihome at 4-Sep-12 17:23pm
   
Can You show ActiveX idl file ?
Achi Mezvrishvili at 5-Sep-12 2:04am
   
Of course i can :)
 
// MFCActiveXControl2.idl : type library source for ActiveX Control project.
 
// This file will be processed by the MIDL compiler tool to
// produce the type library (MFCActiveXControl2.tlb) that will become a resource in
// MFCActiveXControl2.ocx.
 
#include <olectl.h>
#include
 
import "ocidl.idl";
import "oaidl.idl";
[
object,
uuid(4730DB8C-BFA7-40DC-8CDF-06E10CD5CEE4),
dual,
nonextensible,
pointer_default(unique)
]
interface INumber : IDispatch{
[id(1)] HRESULT getNumber([out, retval] int* result);
};
 
[ uuid(2063A4BF-5512-4816-9E7F-B9E855F10727), version(1.0),
control ]
library MFCActiveXControl2Lib
{
importlib(STDOLE_TLB);
 
// Primary dispatch interface for CMFCActiveXControl2Ctrl
[
uuid(3B8C713C-9ED9-457D-8706-B244E7C67AE0)
]
dispinterface _DMFCActiveXControl2
{
properties:
methods:
 
[id(DISPID_ABOUTBOX)] void AboutBox();
};
 
// Event dispatch interface for CMFCActiveXControl2Ctrl
 
[
uuid(A100192E-3F63-40BC-AB53-6FFD42A650E6)
]
dispinterface _DMFCActiveXControl2Events
{
properties:
// Event interface has no properties
 
methods:
};
 
// Class information for CMFCActiveXControl2Ctrl
[
uuid(E8D97ECD-91A6-4D63-BADE-E12E27A9E401)
]
coclass MFCActiveXControl2
{
[default] dispinterface _DMFCActiveXControl2;
[default, source] dispinterface _DMFCActiveXControl2Events;
};
 
[
uuid(92887769-9BA7-4A61-914E-7D66341A4AC6),
control
]
coclass Number
{
[default] interface INumber;
};
};
Achi Mezvrishvili at 6-Sep-12 3:18am
   
if i will un-register an ActiveX control and after that i will call this module exception will say Class Not Registered :). it is okay, but when i will register it, now exception is saying that Class not available (; Please help me someone i am stuck on it too much time (: i have check CLSID in registry it is exists(i do not know may be in registry some value is wrong and i do not know) formally, please help me.
cariolihome at 6-Sep-12 17:48pm
   
Try to specify reference to the INumber interface in the type library MFCActiveXControl2Lib:
[ uuid(2063A4BF-5512-4816-9E7F-B9E855F10727), version(1.0),
control ]
library MFCActiveXControl2Lib
{
...
interface INumber;
 
[
uuid(92887769-9BA7-4A61-914E-7D66341A4AC6),
control
]
coclass Number
{
[default] interface INumber;
};
};
Achi Mezvrishvili at 7-Sep-12 2:51am
   
Same problem (; what a hell ?
cariolihome at 7-Sep-12 16:45pm
   
Please, attach Your ActiveX or execute "oleview YourActiveX.dll" and show results

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 150
2 Richard MacCutchan 135
3 PIEBALDconsult 110
4 Sergey Alexandrovich Kryukov 104
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 3 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100