http://www.perlmonks.org?node_id=824942


in reply to Re^2: Perl Version and Win32::OLE
in thread Perl Version and Win32::OLE

I now believe the issue is related to the 64 bit version of Perl trying to use Win32::OLE to read a 32 bit *registered* DLL, which cannot be done without some creative wrapper work. On a 64 bit OS, you can register 64 and 32 bit DLL's, but 64 bit software can't read 32 bit DLL's, even if they are registered. Here are some articles on the topic:

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

“64-bit programs cannot load and call 32-bit MDAC”

http://www.dnjonline.com/article.aspx?id=jun07_access3264

“The best way to migrate such a product to a 64-bit platform is to migrate both the main module and the dependency DLL, but if the dependency DLL cannot be migrated then it cannot be loaded into the 64-bit process and the application won't work.”

“One possible way of … is to implement a 64-bit wrapper' DLL that exposes the same functions, parameters, types and so forth as the original 32-bit DLL. This wrapper DLL can then make IPC-based calls to the original 32-bit DLL, which has been loaded into a surrogate process.”

It's too bad that Win32::OLE, when used by a 64 bit version of Perl, apparently does not by itself act as the wrapper that performs IPC-based calls to the original 32 bit DLL. Does anyone know of a module we can use in place of Win32::OLE that can perform the appropriate translation so we can use a 32 bit DLL in a 64 bit version of Perl?