LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 12 using a 32Bit in LabVIEW 64bit

Solved!
Go to solution

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

 

0 Kudos
Message 1 of 6
(4,328 Views)
Solution
Accepted by topic author jojo2

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.

Message 2 of 6
(4,324 Views)

Thanks for your help - I already suspected that. 😞

Greetings

 

0 Kudos
Message 3 of 6
(4,298 Views)

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

 

0 Kudos
Message 4 of 6
(4,269 Views)

@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

0 Kudos
Message 5 of 6
(4,260 Views)

@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". Smiley Wink

0 Kudos
Message 6 of 6
(4,255 Views)