【发布时间】:2013-05-08 12:16:54
【问题描述】:
我必须在我的应用程序中使用第三方 DLL。 DLL 是 32 位的,而我使用的系统是 64 位操作系统。
我已在我的 DotNet 应用程序(framework-4.5)中导入了 32 位 DLL,如下所示
[DllImport("Sample.dll",
EntryPoint = "Add",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern int Add(int iA, int iB);
在 IIS 7.5 中 - 我已将“启用 32 位应用程序”设置为“真”。
还尝试将编译器管理器设置为 - X86、x64 和任何 CPU。
但是所有的尝试都会导致相同的错误
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
如何解决这个问题......
【问题讨论】:
-
也许你可以在这里找到答案stackoverflow.com/questions/3439845/…>
-
查看这篇关于 0x8007000B 错误stackoverflow.com/questions/18007967/…的帖子
标签: visual-studio-2010 iis c#-4.0 32bit-64bit dllimport