Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA32.dll backward compatible?

Hi,

I include three NI DLLs as part of my app: visa32.dll, NiViSv32.dll, and Nispylog.dll. These DLLs live in the program's bin folder (not the System32 folder). When a user installs a different version of the NI software, with later versions of the DLLs, problems occur when running the NI applications.

Since there are conflicting versions of the DLLs in different locations (evil twins), the obvious solution might be to keep the DLLs in the System32 folder only. But then there's the potential that the NI software installation might overwrite the DLLs used by my app. Or the reverse situation may occur, in which my app's installation might overwrite the NI software DLLs. In either case, there's the potential for the DLL versions to not match.

Given that the DLL mismatch may occur, I'm thinking that a possible way to minimize problems is to stop putting DLLs in my program's bin directory, to check if the DLLs are in the System32 folder during my app's installation, and to replace the DLLs only with DLLs of a later version (and to do nothing if the DLLs are of an earlier version). This "fix" assumes that these DLLs are backward-compatible, however. Is this assumption correct?

(This fix can't protect against the case where an older version of the NI software is installed after my app has been installed.)

Thanks for your help!
0 Kudos
Message 1 of 4
(8,821 Views)
If your application is running on Windows 2000 and above, I think DLL Redirection might be a good solution for you. Or you were already doing this when you installed the .dll's to your application folder?

- Elton
0 Kudos
Message 2 of 4
(8,813 Views)
VISA32.dll is backward compatible. Bugs aside, you should always be safe as long as you have the latest version installed to the system32 directory. If you always use the NI-supplied merge modules to install VISA, you don't have to worry about an older version overwriting a newer version. None of this is to say that DLL Redirection is not an option, but you shouldn't necessarily have to go that route to get what you want.
0 Kudos
Message 3 of 4
(8,806 Views)
Thanks Elton and drohacek for the ideas! I'll look into both options.
0 Kudos
Message 4 of 4
(8,789 Views)