Click here to Skip to main content
15,446,510 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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
Updated 3-Sep-12 6:56am
v2
Comments
[no name] 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 3-Sep-12 13:17pm     CRLF
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 4-Sep-12 3:32am    
but i have got the same problem (:
cariolihome 4-Sep-12 17:23pm    
Can You show ActiveX idl file ?
Achi Mezvrishvili 5-Sep-12 2:04am     CRLF
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 <idispids.h> 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; }; };

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900