Error 80040154 retreiving COM Class factory

Greetings,

I have a VB.NET application that references a 3rd party Com component. The file is Interop.WINTSRRLIB.dll. My VB.NET application has a project reference to the COM comonent which lives in the directory: C:\WaveTracker.

The application runs fine. When I sent it to my customer, he installed in on his desktop machine. It runs fine. Then he copied all of the application files (which live in C:\WaveTracker) to his laptop. However, on his laptop, he gets the error:

"System.Runtime.InteropServices.COMException (0x80040154). Retrieving the COM class factory for component xxxx failed due to the following error: 80040154"

The customer swears he has the .NET 2.0 Framework installed properly on his laptop. Any ideas on how I can get over this problem?

Kind Regards,

Scott

[897 byte] By [ScottMasters] at [2007-12-24]
# 1
The COM component needs to be registered on his laptop. Start + Run, regsvr32 c:\wavetracker\componentname.dll
nobugz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

I had my customer try this (register thedll with regsrvr32) and he reports to me that the system responds with a message that says that the file was loaded but the entry point could not be found and therefore was not registered. The application still aborts with the same 80040154 error.

I can find no evidence that I had registered the dll on my system (with regsrvr32), nor does my customer remember registering it on his desktop system (where the application works and accesses the dll correctly).

So, I guess I am somewhat flummoxed here...any further advice?

Tx,

Scott

ScottMasters at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
Sounds

like he was trying to register the wrong DLL. If it is a COM

component, it should allow itself to be registered. To find out

what DLL you really need to be registered, pay attention to the GUID

reported in the error message. It will look something like

"{750fdf0e-2a26-11d1-a3ea-080036587f03}". Start Regedit.exe on

your PC and navigate to HKCR\CLSID. Find the GUID that was

reported in the error message. Open the key and look for the

value of 'InProcServer32', it should point to the DLL.

nobugz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4

The GUID reported in the 80040154 message does not show in in a registry search. When attempting to register the dll, the error message is that the DLLRegistryServer entry point cannot be found.

The customer allowed me to access the problem system remotely...there is only one copy of the dll "interop.wintssrapilib.dll" on his system and it is the correct version. In fact, I transferred all of the application files from my system directly to his sytsem and the error persists.

Also, I have a few small dLLs in the application that I wrote....I have never had to 'register' them to have the application work. Furthermore, when I do attempt to register them (just to shed some light on this problem), I (again) get the error that the DllRegister Server entry point cannot be found.

I think this may be an instance of the dll-hell I have always heard about. Any clue as to what is happening?

Tx

Scott

ScottMasters at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 5
Make sure you look in the registry of a PC on which your app works. Don't do a search, just look through the keys in HKCR\CLSID for the GUID, they are sorted alphabetically. The fact that you can't find a DLL that can be registered with regsvr32 is a strange problem. If might live in another folder, c:\windows\system32 perhaps. Look at the properties of the WinTSRRapiLib reference in your project. Also, the component may itself use another ActiveX component that requires registration. Like the VB6 runtime files for example.

Another way to debug this problem is to use the RegMon utility, available for free at www.sysinternals.com. It shows you how your app uses the registry. Run it on yours and run it on the customer's and compare the two.

nobugz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 6

i went to www.sysinternals.com and downloaded a few utilities that led me to the problem...'listdlls' and 'procexp' were very useful. The problem was simply that the 3rd party dll required other dlls that were not on the system. So I installed the required (other) dlls and everything is fine.

Thanks for your help and recommendations.

Scott

ScottMasters at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 7

Hi Scott, could you please tell me which utilities you downloaded from www.sysinternals.com, how can i find them at this page?

I have the save trouble with a web service

Thanks for your help

PabloDFT at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...