1.ask:
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,
2.ans:
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.
2.2
The COM component needs to be registered on his laptop. Start + Run, regsvr32 c:\wavetracker\componentname.dll
2.3
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,
2.4
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.
ReplyQuote
Thursday, September 28, 2006 10:22 PMScott Masters
0Sign In to VoteThe 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
ReplyQuote
Friday, September 29, 2006 12:55 AMnobugzMVP, Moderator
0Sign In to VoteMake 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.
ReplyQuote
Friday, September 29, 2006 2:51 AMScott Masters
0Sign In to Votei 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
ReplyQuote
Wednesday, November 01, 2006 4:44 PMPabloDFT
0Sign In to VoteHi 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
ReplyQuote
Wednesday, May 21, 2008 9:43 PMtngm
0Sign In to VoteYou need to register the com class on the web server too. Run .reg and .bat of your DLL on the web server.
ReplyQuote
Monday, September 01, 2008 5:16 AMIntelligenceIndia
0Sign In to VoteHello Friend,
the file you reffered to register "interop.wintssrapilib.dll" is only the wrapper fro your original file.
You can't register this wrapper file with regsvr32.exe. You need the original component file "wintssrapilib.dll".
So you copy the file "wintssrapilib.dll" to C:\WaveTracker and issue the command "regsvr32 C:\WaveTracker\wintssrapilib.dll".
I hope your problem solved..
Senthil Kumar D,
[email protected]
ReplyQuote
Tuesday, September 16, 2008 1:31 PMLightGuy
0Sign In to Voteit looks like you deinstalled some component and it unregisted your dll. Simply reinstall it or fire regsvr32
ReplyQuote
Friday, November 14, 2008 12:41 AMmsp115
0Sign In to VoteI'm running a 32-bit custom app on 64-bit windows xp sp2. It starts fine, but when it tries to connect to another app (also 32-bit) I get the problem referenced here (80040154 retreiving COM Class factory). So, I went to the GUID directory for for 32-bit procs in a 64-bit architecture (HKCR\Wow6432Node\CLSID) and found the GUID referenced in the error msg. Looked at the proc and then regsitered it with regsrv32. Registration went successfully.
However, I still get the same error when running the program and trying to connect. Any addt'l thoughts on this?
Edited bymsp115 Friday, November 14, 2008 12:43 AM
ReplyQuote
Friday, November 14, 2008 1:00 AMnobugzMVP, Moderator
0Sign In to VoteIt sounds like your app is running in 64-bit mode. That would be automatic if it is a .NET app. Use Corflags.exe or Build + Platform Target to force it to run in 32-bit mode.
--------------------------------------------------------------------------------
Hans Passant.
ReplyQuote
Monday, November 17, 2008 4:09 PMmsp115
0Sign In to VoteCorflags worked like a charm. .NET was indeed trying to force it to run as a 64bit app. Running corflags with the /32bit+ switch modified the .exe properties and allowed for the app to start and connect without incident. Thanks so much - appreciate your quick (and accurate) response!
Mike
Edited bymsp115 Monday, November 17, 2008 7:41 PM
ReplyQuote
Tuesday, April 14, 2009 12:01 PMRajivYK
0Sign In to VotePlease register the dll's and restart IIS to fix the Issue.
ReplyQuote
Saturday, September 26, 2009 11:33 AMmessengr
0Sign In to Vote80040154
Proposed As Answer bymessengr Saturday, September 26, 2009 11:33 AM
ReplyQuote
Tuesday, December 01, 2009 9:51 AMFortyEightK
1Sign In to VoteIf you're getting the error within a website I managed to fix this error by going into IIS and going into the Advanced Settings of the Application Pool the website is using. There is an option to "Enable 32-bit Applications" which will probably be set to False. Set it to True and restart the website.
ReplyQuote
Tuesday, December 15, 2009 3:50 PMmtthwbrnd
0Sign In to VoteI know it is not constructive, but I just have to say it. After a couple of frustrating days struggling with this needless, pointless issue. This is a ridiculous way of doing things. I am struggling to do all this stupid stuff with DLL within the .NET/COM framework. It is so complicated it could be a monty python sketch. Can't you guys at Microsoft possibly, ever, make something that just works?
I mean, why the ____ should I need to personally worry about the registry? This is crazy. Can't you see how crazy this is?
Proposed As Answer byasadim 16 hours 2 minutes ago
ReplyQuote
Wednesday, December 23, 2009 6:43 AMjeneesh k. velayudhan
0Sign In to VoteHi...
If you have enabled the option "Enable 32-bit Applications". Can you execute the applications
which are developed in 64 bit ? I think, that is not possible. So, we willn't get the advantage of
64 bit, am i right ?
Also, how will you enable the "Enable 32-bit Applications" ? I dont find any options in IIS application pool.
I have enabled it through command prompt.
ReplyQuote
Sunday, January 10, 2010 11:35 AMPeter Holmdahl
0Sign In to VoteI have been building my App for 'Any CPU' and that has worked fine together with the COM object the App denpend upon. Then I installed a 64-bit OS and continues to build against Any CPU and got this error code when trying to use the COM object. It turned out I had to build against x86 to still use the COM object. But that shouldn't be a problem (as long as I can run it on my x64 OS (which I can)).
Just a note...
ReplyQuote
Thursday, February 04, 2010 10:29 PMpacmantab
0Sign In to VoteIn some cases, certain DLLs (like capicom) cannot be placed within the Inetpub folder. If you are still having trouble with this error, try placing, and registering, the DLL somewhere on the C:\ drive (i.e., C:\SharedDLLs). That worked for me.
ReplyQuote
Friday, March 12, 2010 12:47 AMPranay_Msbuild
0Sign In to VoteI have this same issue. I have an application which was build with 'Any CPU'. This application seemed to be working fine. I moved all my code from my desktop to my laptop and I started getting this error. The only difference between my laptop and desktop is the Operating System. Both are using 32 bit version on OS and all the .net versions are same. the only difference one is using XP and the other Windows 7. I tried finding the CLSID in regedit, but this is not present. Any other ideas as to how can i fix this??
ReplyQuote
Friday, March 12, 2010 4:07 PMpacmantab
0Sign In to VoteMight depend on the version of VS you are running. A couple of things to try:
- Re-install the framework and restart IIS
- Try publishing the solution (if its VS2008) and setting up a virtual directory via that.
ReplyQuote
Wednesday, March 24, 2010 10:48 PMasadim
0Sign In to VoteI know it is not constructive, but I just have to say it. After a couple of frustrating days struggling with this needless, pointless issue. This is a ridiculous way of doing things. I am struggling to do all this stupid stuff with DLL within the .NET/COM framework. It is so complicated it could be a monty python sketch. Can't you guys at Microsoft possibly, ever, make something that just works?
I mean, why the ____ should I need to personally worry about the registry? This is crazy. Can't you see how crazy this is?
I share your anxiety lol