64 bit app calling 32 bit dll? How to call 32bit PDF to Image DLL (pdf2image.dll) from a 64bit application?

>>We have created a 64 bit library to call the 32bit pdf2image.dll. This compiles and links but when the dll is loaded it generates a program trap.

No, 64bit DLL can't call 32bit DLL, because they are work in same memory space. You need write a 32bit Command Line EXE application to call 32bit DLL Library, and then call this 32bit Command Line EXE from your 64bit DLL or 64bit EXE, you will get it work.

64bit DLL or EXE call 32bit DLL, ERROR,
64bit DLL or EXE call 64bit DLL, OK,
64bit DLL or EXE call 32bit EXE, OK,
64bit DLL or EXE call 64bit EXE, OK,

VeryPDF is provide a PDF2ImageCOM.exe COM Interface which allow you to call pdf2image.dll from both 32bit and 64bit DLL or EXE application,

https://www.verypdf.com/wordpress/201303/64bit-version-of-pdf-to-image-converter-com-35162.html

https://www.verypdf.com/wordpress/201106/pdf-to-image-converter-sdk-64-bit-version-439.html

https://www.verypdf.com/wordpress/201107/pdf-to-image-sdk-aspcom-install-1300.html

https://www.verypdf.com/wordpress/201107/pdf-to-tiff-conversion-issues-1286.html

by the way, VeryPDF will release a pure 64bit version of pdf2image.dll library soon, if you wish evaluate this version, please feel free contact us via VeryPDF Ticket System,

http://support.verypdf.com

we will let you know as soon as 64bit version of pdf2image.dll library is ready.

VeryPDF

----------------------------------------------------------------------------

Some Information from Internet, for your reference:

----------------------------------------------------------------------------

Urgent: Want to call 32 bit DLL from 64 bit C++ application on Windows

Hi there,

I want to call 32 bit DLL from 64 bit C++ application on Windows. For 32 bit DLL, I have import library also. I am getting linking errors while compiling 64 bit application which uses 32 bit DLL by using import library.

Please let me know. It is urgent.
Thanks so much.
-------------------------------------------------
A 64 bit application cannot use a 32 bit library directly if you read the MSDN you should have come across this already.

The only way to use a 32 bit library from a 64 bit application is by loading the dll into a 32 bit process and using ipc to communicate with it.
-------------------------------------------------
If you are familiar with DCOM, a ready solution is to convert the 32 bit DLL to a COM DLL and host the DLL in Component Services. It basically will host the DLL in a process called DLLHOST.EXE and then use DCOM for the ipc. If not familiar with DCOM, then you will have to pick another approach. Evaluate whether reasonable to recompile the DLL as 64-bit.
-------------------------------------------------
You cannot link 64-bit EXEs to 32-bit DLLs or vice versa. On a 64-bit Windows OS, the DLLs in Windows\System32 are actually 64-bit DLLs. The 32-bit versions are in Windows\SysWow64.
-------------------------------------------------
Thanks so much for replies.
-------------------------------------------------
-------------------------------------------------
Another question on Internet:
-------------------------------------------------
-------------------------------------------------
Is there a way to load a 32bit DLL library (something with the same usage as LoadLibrary) I would like to use that function along with GetProcAddress.

I looked at WOW, but it does not seem to offer the functionality. The functionality should exist, since tools like Dependency Walker are able to read the symbols of a 32bit dll even though its 64bits.

thanks.
-------------------------------------------------
Sorry, but you can only load a 32bit DLL into a 64 bit process when you are loading the dll as a data file. You can't execute the code.

http://support.microsoft.com/kb/282423

Microsoft recommends that you use interprocess COM to use 32 bit code with a 64 bit application. Here's an article explaining the process

http://blog.mattmags.com/2007/06/30/accessing-32-bit-dlls-from-64-bit-code/

Its not fun.
-------------------------------------------------
There's a difference between reading a 32 bit executable and executing code within a 32 bit executable. I don't believe that windows offers any functionality to do that.

The only way you're likely to be able to do that is to create a 32 bit process that loads the dll and then do interprocess communication to pass the results between the two processes.

VN:F [1.9.20_1166]
Rating: 2.5/10 (2 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
64 bit app calling 32 bit dll? How to call 32bit PDF to Image DLL (pdf2image.dll) from a 64bit application?, 2.5 out of 10 based on 2 ratings

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!