So, I've been using JPIB to communicate with GPIB devices in my java program. However, I have run into a snag. Newer systems are built on 64 bit OS's. However, the jpib.dll file is written in 32-bit. I can't think of any kind of calls that it would need to make that are truly 64-bit dependent.
The real trouble here is that the JPIB project hasn't been updated since september of 2006. I've tried emailing the dev through SourceForge but I don't think I'll get anywhere with that.
Does anyone know of any ways around this? Or know how (and could tell me how) to recompile the .dll into AMD-64 compliance?
On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL. However, 64-bit Windows supports remote procedure calls (RPC) between 64-bit and 32-bit processes (both on the same computer and across computers).
Note: I have no idea what JPIB and GPIB are.
If you want to use the DLL as-is, then you'll need to write an application that can dynamically link that DLL and communicates with your application via some sort of IPC.
If you want to rebuild that DLL, then you'll need to get the source and all of its dependencies and install the build tools. This shouldn't be too tough although if you're installing MS Visual Studio I seem to require a couple of gotchas regarding getting the x64 stuff installed. This may depend on your install platform, though; if you're installing on x64 presumably it'll Just Work.
A 32-bit VM will still work on a 64-bit AMD platform, and Intel EMT64 platforms.
However, if you want to use the library in a 64-bit process, you can use java to help you out. The solution uses 2 JVMs - a 32-bit one and a 64-bit one - the 64-bit one hosts your main application. The 32-bit one hosts the JPIB library. You then use RMI to bridge between them. In more detail:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With