Retrieving the COM class factory for component with CLSID {xxxx} failed due to the following error: 80040154

StackOverflow https://stackoverflow.com/questions/14859151

質問

I'm upgrading a VB6 app to VB.Net. It used the "Adobe Acrobat 10.0 Type Library". However, when using with the .Net project I'm getting the error in the title. I created a small test project. The exception is thrown when I try to instantiate an AcroPDDoc, on the following line:

Dim acroApp As Acrobat.AcroPDDoc = New Acrobat.AcroPDDoc()

The adobe library resides at C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.dll. When added, it puts a dll called "Interop.Acrobat.dll" into the project's obj folder. I've tried running RegSvr32.exe on both dlls, as I saw advised somewhere, but recieved an error along the lines of

dll was loaded but the call to DllRegisterServer failed with error code 0x80004005

I haven't been able to find a great deal on that error code.

I've also tried chainging the platform target to x86 from 'any cpu'.

EDIT - I've experienced the same problem on both 32 and 64 bit editions of windows 7.

In win 7 64, I entered the following:

C:\Windows\SysWOW64> regsvr32 "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.dll"

received the following error:

RegSvr32 error - 64 bit win7

In win 7 32, entered the following:

C:\Windows\system32> regsvr32 "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.dll"

recieved the following error:

RegSvr32 error - 32 bit win7

EDIT 2 - As per Raymond Chen's suggestion, I took another pass at the Adobe site. I found a couple of threads here, here, and another question on stackoverflow. The former two links don't refer specifically to .NET, but from them, it seems as though the full version of Acrobat Reader must be installed for these interop classes to work/for the dll in question be registered. I'll check tomorrow, but I have a strong suspicion that the customer's environment may include full versions of Acrobat Reader. To all who answered, thanks for your time.

EDIT 3 - Got my hands on the full version of Acrobat, installed and, lo and behold, everything's dandy!

役に立ちましたか?

解決

As noted above, the dll would not allow itself to be registered unless the full version of Acrobat was installed on the machine.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top