Error 80040154 retreiving com class factory

Source: Internet
Author: User

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 regires. 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 cocould not be found and therefore was not registered. the application still aborts with the same 80040154 error.

I can find no evisponthat 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 shoshould 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 shocould point to the DLL.

Replyquote
Thursday, September 28,200 6 pmscott masters
0 Sign in to votethe guid reported in the 80040154 message does not show 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,200 6 amnobugzmvp, moderator
0 Sign 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 regires. 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,200 amscott masters
0 Sign 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,200 6 pmpablodft
0 Sign in to votehi Scott, cocould 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,200 8 pmtngm
0 Sign 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,200 8 amintelligenceindia
0 Sign 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,
Sd_senthilkumar@hotmail.com

Replyquote
Tuesday, September 16,200 8 pmlightguy
0 Sign in to voteit looks like you deinstalled some component and it unregisted your DLL. Simply reinstall it or fire regsvr32
Replyquote
Friday, November 14,200 8 ammsp115
0 Sign 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 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,200 8 am
replyquote
Friday, November 14,200 8 amnobugzmvp, moderator
0 Sign in to voteit sounds like your app is running in 64-Bit mode. that wocould be automatic if it is. net app. use corflags.exe or build + platform target to force it to run in 32-Bit mode.
--------------------------------------------------------------------------- -----
Hans passant.
replyquote
Monday, November 17,200 8 pmmsp115
0 Sign 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. 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,200 8 PM
replyquote
Tuesday, limit l 14,200 9 pm rajivyk
0 Sign in to voteplease register the DLL's and restart IIS to fix the issue.
replyquote
Saturday, September 26,200 9 ammessengr
0 Sign in to vote80040154

proposed as answer bymessengr Saturday, September 26,200 9 am
replyquote
Tuesday, december 01,200 9 amfortyeightk
1 sign 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 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,200 9 pmmtthwbrnd
0 Sign 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. net/COM fram Ework. It is so complicated it cocould be a Monty Python sketch. Can't you guys at Microsoft possibly, ever, make something that just works?

I mean, why the ____ shoshould 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,200 9 amjeneesh K. velayudhan
0 Sign 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
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,201 ampeter holmdahl
0 Sign in to votei have been building my app for 'any CPU 'and that has worked fine together with the COM object the app denpend. 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,201 pmpacmantab
0 Sign 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,201 0 ampranay_msbuild
0 Sign 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. 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,201 0 pmpacmantab
0 Sign 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,201 0 pmasadim
0 Sign 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. net/COM framework. it is so complicated it cocould be a Monty Python sketch. can't you guys at Microsoft possibly, ever, make something tha T just works?

I mean, why the ____ shoshould I need to personally worry about the registry? This is crazy. Can't you see how crazy this is?

I share your anxiety LOL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.