简体   繁体   中英

Unable to load DLL ‘ABCpdf9-32.dll’. The specified module could not be found (Exception from HRESULT: 0x8007007E)

Development and deployment on 32-bit system were successful, but a production system running Windows Server 64-bit caused several errors:

Exception System.DllNotFoundException Unable to load DLL 'ABCpdf9-32.dll'. The specified module could not be found (Exception from HRESULT: 0x8007007E)

ABCpdf is a 3rd party library that supports both 32 and 64 bit architecture. The .dlls are meant to be put in place using an installer provided by the vendor of the software. When you download the installer from the vendor, you select the 32-bit installer or the 64 bit installer, and then you install it, and enter the key and off you go. From your application's perspective, you just reference abcpdf.dll regardless of whether you'll be deploying to 32bit or 64bit, and the dll handles pointing you over to the correct dll.

The answers so far have mislead you. Do not address the problem by altering your application, just install the right version of ABCpdf on the server to which you're deploying.

只有在所有开发人员和服务器机器上安装供应商提供的软件时,问题才会解决。

My Application is 64 bit and some old module is using .32 bit ABCpdf. When I try to print pdf for a new module which uses 64 bit ABCpdf it works and prints. But when code tries to print using old modules which are in 32 bit then it throws following exception. As there is only one ABCpdf.dll to be added. Also, you cannot reference a ABCpdf8-32.dll directly into a 64 bit project.

I was getting error as: unable to load DLL 'ABCpdf8-32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

When I tried to add reference following error occured.

在此处输入图片说明

After trying for some time I directly added the dll into bin folder and it worked. The permission is not only issue as all my folders had proper permissions given. So, if anyone is having similar issue can try this.

ABCpdf is a COM dll that has unmanaged code right? In that case it cannot run on a 64bit platform. The article given below explains this (Check the last bits of it)

http://www.hanselman.com/blog/BackToBasics32bitAnd64bitConfusionAroundX86AndX64AndTheNETFrameworkAndCLR.aspx

Additionally, I would also make sure that the ABCpdf dll is not dependent on any other 32bit dlls. You can use Dependency Walker to test this ( http://www.dependencywalker.com/ )

You will need to find the 64bit versions of the respective COM dlls.

Unless you really need your app to be 64-bit (I doubt it - even the VS team opted against), I would suggest you just build and deploy as a 32-bit app. There are few good reasons to go 64-bit, and it complicates things like third-party drivers, COM objects, etc. It may not even be possible to round up 64-bit versions of all these.

我解决了它,它为 Bin 文件夹中的系统帐户提供了完全访问权限。

So I was getting the same error. I am using win64.

  1. APCpdf.NEET64.exe run this (if you don't have it in your system)
  2. Go To VS(any version) right click on your solution and add References
  3. Click on COM tab and find APCpdf.NET PDF Generation Library
  4. click Add, clean your solution and rebuild it again.

These are the steps I followed to overcome my issue. Hope it helps :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM