5
votes

I've got a C# Application that is 32-bit with a target x86 Installer. This application can be installed an run on x64 machine no problem. However, a third party piece of hardware from a vendor (which is integrated into the software) now requires the use of a 64bit DLL whenever we install on x64 systems.

Currently I have placed both the 32bit DLL and 64bit DLL in my project. However the target x86 Installer obviously doesn't like the 64bit DLL.

Is it possible for me to create a solution whereby I can deploy the 64bit DLL and/or 32bit DLL and still only have one installer project? (I've looked at third party software called Advanced Installer but I do not know for sure if this will help me achieve the solution I need)

Or is it possible to create a generic Installer project?

Note: Two installer (x86 vs x64) deployments aren't feasible because we have a process for automatic updates I do not want to redefine. Maintaining one MSI file is important to me.

Advice is much appreciated.

1
You can do this in NSIS.leppie
The real problem here is that you won't be able to use the x64 DLL from your x86 application.Daniel Hilgarth
You can't use a 64-bit DLL from a 32-bit process (or vice versa). This is in part because there's no way to translate between the address spaces. See this post on Raymond Chen's blog for details. If you want to mix 64-bit and 32-bit, you have to have two processes, and some kind of inter-process communication.Joe White
@Encryption: Have you tested it even once? Compilation is not really an indicator here, especially if the DLL in question is unmanaged.Daniel Hilgarth
I can compile a lot of things that don't work worth a darn.Jim Mischel

1 Answers

0
votes

Installing the file from a x86 MSI is not a problem with Advanced Installer, the following article explains how to do it: http://www.advancedinstaller.com/user-guide/qa-OS-dependent-install.html

Also, if you have two versions of the DLL with the same name that need to be placed in the folder you should look here: http://www.advancedinstaller.com/user-guide/qa-install-file-with-same-name.html

However, you should first check if your application can correctly load the x64 DLL, as the guys mentioned in their comments.