I have built a (strongly named) .Net library that uses a 3rd party tool, pdf2image. This 3rd party tool is supplied as a old type (pre-com) windows dll (something I almost understand). Please see the sample .Net declaration and call in the Code section. This all works fine on a Windows 2003 32 bit machine.
When I tried to move this library to a Window 2008 64 bit server, the call to 3rd party tool fails, almost certainly because it is a 32 bit dll (the .Net code itself runs fine until it gets to this call). I've heard of a 32 bit compatability mode on 64 bit machines, but all of the discussions focus on running 32 bit programs (EXEs) rather than accessing legacy libraries (DLLs).
Is there any way to make this 3rd party tool dll work on a 64 bit machine?
[DllImport(@"C:\bin\pdf2image.dll", CharSet = CharSet.Auto)]
static extern uint PDFToImageConverter(
[MarshalAs(UnmanagedType.LPStr)] string FileName,
[MarshalAs(UnmanagedType.LPStr)] string OutputName,
IntPtr UserPassword, IntPtr OwnPassword,
int xresolution, int yresolution, int bitcount,
int compression, int quality, int grayscale,
int multipage, int firstPage, int lastPage);
result = PDFToImageConverter(FileIn, _FileOut, UserPassword, OwnPassword, 300, 300, 1,
COMPRESSION_LZW, 70, FALSE, TRUE, -1, -1);