简体   繁体   English

无法在Windows 7 32位操作系统的C#应用​​程序中加载C ++ DLL

[英]Unable to load C++ DLL in C# application in Windows 7 32 bit OS

I have a DLL written in C++ that needs to be used by an application in C#. 我有一个用C ++编写的DLL,需要由C#中的应用程序使用。 Settings: OS: Win7 32 OS C++ DLL: 64 bit C# application: 64 设置:OS:Win7 32 OS C ++ DLL:64位C#应用程序:64

I set the Platform as 64 bit for C++ project. 我将平台设置为C ++项目的64位。 then i created the DLL. 然后我创建了DLL。 If i try to access the C++ dll, it fails. 如果我尝试访问C ++ dll,它将失败。 getting error "Invalid DLL" 收到错误“无效的DLL”

The answer is exactly as winSharp93 said. 答案与winSharp93所说的完全一样。 If the DLL is 64-bit, you can't load it on a 32-bit OS. 如果DLL是64位的,则不能在32位的OS上加载它。

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

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