简体   繁体   中英

How 32 bit C# application can utilize a 64 bit DLL

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM