11-22-2011 10:45 AM
Hi,
This is my first request here and i have a short question: I try to load a 32bit DLL in LabVIEW 2011 64bit and i always got error 12. What went wrong? Is it possible to use 32bit DLLs in a 64Bit LabVIEW?
Thanks for your help
Greetings
Micha
Solved! Go to Solution.
11-22-2011 10:48 AM
You cannot load 32 bit dlls in a 64bit application. Can you recompile the dlls to 64 bit? You might have to request a 64bit version from the maker. Also, don't forget that with a single license you can run both LabVIEW 64 and 32 bit on a single computer.
11-23-2011 06:44 AM
Thanks for your help - I already suspected that. 😞
Greetings
11-28-2011 04:31 PM
If you cannot get a re-compiled 64-bit version (perhaps because it is not a DLL built at your company), you might be able to build a new 64-bit dll that calls this one. I have no idea how to do it, but a colleague of mine says it is fairly trivial for someone with C or .NET skills.
Good luck,
Bob Young
11-28-2011 05:00 PM
@BOB Y. wrote:
If you cannot get a re-compiled 64-bit version (perhaps because it is not a DLL built at your company), you might be able to build a new 64-bit dll that calls this one. I have no idea how to do it, but a colleague of mine says it is fairly trivial for someone with C or .NET skills.
Good luck,
Bob Young
Hmm, I'm quite certain that you cannot load a 32 bit dll in a 64 bit process and execute its code; even if you wrap it in a 64 bit dll, because in the end the 32 bit dll will still have to be loaded by the 64 bit process. The only possible is is through interprocess communication. I.e. you create a second process that is 32 bit which loads the dll. However, I'm not sure how trivial this is; but I don't know .net. See here: http://blog.mattmags.com/2007/06/30/accessing-32-bit-dlls-from-64-bit-code/
Matt
11-28-2011 05:16 PM
@BOB Y. wrote:
If you cannot get a re-compiled 64-bit version (perhaps because it is not a DLL built at your company), you might be able to build a new 64-bit dll that calls this one. I have no idea how to do it, but a colleague of mine says it is fairly trivial for someone with C or .NET skills.
I think your colleague's idea of "trivial" may be debatable. As noted in the blog entry as well as Microsoft (http://support.microsoft.com/kb/282423), a 64-bit process (even a 64-bit DLL) cannot directly load a 32-bit DLL. I would hardly call doing interprocess communication "trivial".