简体   繁体   English

32位C#应用程序如何利用64位DLL

[英]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. 我有一个32位的C#应用​​程序与目标x86安装程序。 This application can be installed an run on x64 machine no problem. 这个应用程序可以安装在x64机器上运行没问题。 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. 但是,当我们在x64系统上安装时,来自供应商的第三方硬件(集成到软件中)现在需要使用64位DLL。

Currently I have placed both the 32bit DLL and 64bit DLL in my project. 目前我已经在我的项目中放置了32位DLL和64位DLL。 However the target x86 Installer obviously doesn't like the 64bit DLL. 但是目标x86安装程序显然不喜欢64位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? 我是否可以创建一个解决方案,我可以部署64位DLL和/或32位DLL,但仍然只有一个安装程序项目? (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) (我查看了名为Advanced Installer的第三方软件,但我不确定这是否有助于我实现我需要的解决方案)

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. 注意:两个安装程序(x86 vs x64)部署是不可行的,因为我们有一个自动更新的过程,我不想重新定义。 Maintaining one MSI file is important to me. 维护一个MSI文件对我很重要。

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 从高级安装程序安装文件从x86 MSI不是问题,以下文章解释了如何执行此操作: 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 此外,如果您有两个版本的DLL具有相同的名称,需要放在该文件夹中,您应该在这里查看: 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. 但是,您应首先检查您的应用程序是否可以正确加载x64 DLL,正如他们在评论中提到的那样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 c#中64位应用程序中的32位dll - 32bit dll in 64bit application in c# 我可以从64位应用程序运行C#程序集(dll)为32位吗? - Can I run a C# assembly (dll) as 32bit from a 64bit application? 如何在32位操作系统上构建64位应用程序? [C#] - How to build a 64 bit application on 32 bit OS? [c#] 我可以从 64 位 C# Winforms 应用程序调用 MAPI32.DLL > MAPISendMail 吗? - Can I call MAPI32.DLL > MAPISendMail from a 64-bit C# Winforms application? 如何使用P / Invoke从64位C#应用程序中调用64位C ++ DLL? - How can I use P/Invoke to call a 64-bit C++ DLL from a 64-bit C# Application? 如何在64位应用程序中使用win 32位dll - how to use win 32 bit dll in 64 bit application 如果我的 C# AnyCPU 应用程序以 32 位 (WOW64) 运行,我如何将其重新运行为 64 位? - How I can re-run my C# AnyCPU application as 64 bit, if it's running as 32 bit (WOW64)? 如何在 Excel 64 位 VSTO C# 上使用 .dll 32 位运行 - How to use .dll 32bit run on Excel 64bit VSTO C# 使用Environment.Is64BitProcess从c#应用程序动态调用32位或64位DLL - Dynamically calling 32-bit or 64-bit DLL from c# application using Environment.Is64BitProcess 如何使用c#代码从64位机器上的64位应用程序获取32位应用程序数据文件夹 - how to get 32 bit application data folder from 64 bit application on 64 bit Machine using c# code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM