Retrieving the COM class factory for component with CLSID failed due to the following error: 80040154
-
Friday, December 09, 2011 9:09 PM
This desktop app is trying to use a Third party TypeLib in vb.net and when trying to instantiate this object:Dim mycalWWList As New CALWorkitemWorkstepList
This error is produced:
Retrieving the COM class factory for component with CLSID{{F86DE171-2A5B-11CF-A2A6-08005AC10759}} failed due to the following error: 80040154
Oleview of the type library shows this:[ odl, uuid(F86DE170-2A5B-11CF-A2A6-08005AC10759), helpstring("ICALWorkitemWorkstepList Interface"), dual, oleautomation ] interface _ICALWorkitemWorkstepList : IDispatch { [id (0x80013001), propget] HRESULT Count([out, retval] long* retval); [id(0xfffffffc), propget] HRESULT _NewEnum([out, retval] IUnknown** retval); [id(0x80013002), propget] HRESULT Item( [in] long lOrdinal, [out, retval] _ICALEnumItem** retval); }; [ uuid(F86DE171-2A5B-11CF-A2A6-08005AC10759) ] coclass CALWorkitemWorkstepList { [default] interface _ICALWorkitemWorkstepList; };
I notice that each class in the COM and .net interop have interface registered and coclass that is not registered. There are several like this where the first uuid of the interface is in the registry, the coclass uuid is not (henceforth no objects of those classes can be created).What can i do to make this work??
Thanks much for any light to lead me to what next since i have tried everything that i know!
All Replies
-
Monday, December 12, 2011 4:09 PM
It doesn't sound like the COM library (or dependent component) is properly registered. The Process Monitor utility should be able to help you identify the problem.
Also, don't know whether your app is running 32 or 64-bit, but this could also be the source of the problem.
Paul ~~~~ Microsoft MVP (Visual Basic) -
Monday, December 12, 2011 10:05 PM
Thanks Paul,
It is 32 bit app. I also think its a dll down the line that is not registered properly. But about a dozen suspicious dlls i tried to regsvr just sent back that famous error of "entry point not found"
So now I built 2 little apps that do nothing more than
Dim mycalWWList As New CALWorkitemWorkstepList
One each of VB6 and VB.net. I have looked at them both in procexp, procmon and depends. I don't know enough to have much help on that yet. I do have both logs at the moment of depends.exe. Any more suggestions are greatly appreciated :)
Fingerstyler -
Tuesday, December 13, 2011 7:18 PMWhen you use the Dependency Walker does it indicate that any modules are missing?
Paul ~~~~ Microsoft MVP (Visual Basic) -
Wednesday, December 14, 2011 3:15 PM
No errors seem to be reported, however the last line before the "Exited" line:
GetProcAddress(0x7C800000 [c:\windows\system32\KERNEL32.DLL], "FlsAlloc") called from "c:\windows\system32\MSCOREE.DLL" at address 0x79006F3C and returned 0xFFBADD11 by thread 1.
That may be part of security? The exe has been sucessfully signed as well as the introp dll.
Fingerstyler- Edited by Finger.Styler Wednesday, December 14, 2011 3:30 PM
-
Wednesday, December 14, 2011 3:34 PMDoes this type library work from a VB 6.0 app?
Paul ~~~~ Microsoft MVP (Visual Basic) -
Wednesday, December 14, 2011 7:45 PM
Yes it always works fine. The type library imports --> importlib("stdole2.tlb". I have the dependcy log for that short vb6 app that justDim mycalWWList As New CALWorkitemWorkstepList
What could i look for in there?
Fingerstyler -
Thursday, December 15, 2011 2:33 PM
Did you use the below method to add the type library to your .NET project?
http://msdn.microsoft.com/en-us/library/fwawt96c.aspx
Paul ~~~~ Microsoft MVP (Visual Basic) -
Thursday, December 15, 2011 5:11 PM
A little less..since i have vs2008, just add ref to .tlb. then singtool the dll. I made sure the .tlb was REGTLIB.exe.
Framework installed versions - 1.1, 2.0 sp2, 3.0 sp2, 3.5 sp1
btw- I have even started over again a few times and went the tlbimp route. This is my first experience with interop, although i completed the skillport course on interoperability twice its not helping? lol I'm going to look around see if i can find another 3rd party tlb to see if i can implement that. I see lots of the same CLSID 80040154 issue all over the web with solutions:
- compile option x86
- regsvr32 your dlls first and regtlib the tlb
- left unanswered.......
Fingerstyler -
Thursday, December 15, 2011 7:05 PM
I found by random, 1 class in the typlib that will instantiate obj. it does not look much different in the odl than the class that won't work (found many that don't work) So i tried to run profile using denpendency walker, still exits like the example above, so no help there.
Fingerstyler -
Monday, December 19, 2011 2:02 PM
If your underlying DLL code is managed then you don't need to access the DLL through a COM interface in your .NET app. Is this what you are doing?
Paul ~~~~ Microsoft MVP (Visual Basic) -
Tuesday, December 20, 2011 6:48 PM
It is a legacy COM dll that is registered. The class i spoke of above that will create obj, is found of course in the registry. I have noticed that there are 7 coclasses that are found in the registry out of the 57 coclasses in the typelib. I have tried Dim blabla as New blabla with a couple of them and they work! This takes me back to your first comment "It doesn't sound like the COM library (or dependent component) is properly registered." Although when i regsvr32 that dll it just reports back "DLLregistration of dllserver suceeded". Still searching....
Fingerstyler -
Tuesday, December 20, 2011 7:01 PMNot sure what development tool was used to create the COM DLL, but can you add a reference directly to the DLL from the COM tab - instead of referencing the type library?
Paul ~~~~ Microsoft MVP (Visual Basic) -
Tuesday, December 20, 2011 7:53 PM
Refernecing the dll directly produces the error "a reference to dll could not be added. please make sure that the files is accessible, and that it is a valid assembly or COM component.
I have meticulously imported all the keys etc throughout the registry that i manually created to look just like a class that works. This was several .reg files. The .net app still produces the same error as in beginning "80040154". This is more puzzling because now at least the CLSID exists, but so do all other keys/data. I was expecting it to work or prodcue a new error. What's next....is there anything next?
Fingerstyler -
Wednesday, December 28, 2011 7:38 AMPlease check your COM component again, to make sure it is a correct one. And I suggest you ask this question on the C++ forum because you develop the com component in C++.
Call me ghost for short, Thanks
To get the better anwser, it should be a better question. -
Friday, January 06, 2012 6:48 PM
Thanks Paul, Thanks Ghost,
maybe i will ask the question in C++ forum - status is-
Actually i did get a new error of 80040111 which is not much help. After much digging i found the documention for the large legacy app. I did the repair for the add/remove/programs for that module of the legacy app hoping it would fix up the registry but no such luck.
Fingerstyler -
Thursday, August 09, 2012 8:54 AM
Class in the assembly is not properly registered 80040154--error code stands for that . But i don't know how to register the assembly.
By putting the assembly in GAC the solution can be resolved I think.But How is my question..
can anyone help me?
-
Thursday, August 09, 2012 11:59 AM
Class in the assembly is not properly registered 80040154--error code stands for that . But i don't know how to register the assembly.
By putting the assembly in GAC the solution can be resolved I think.But How is my question..
can anyone help me?
You need to post a new question and explain what you are doing.Paul ~~~~ Microsoft MVP (Visual Basic)
-
Thursday, September 27, 2012 4:10 AM

