我有一个dll文件。我用它在Windows窗体应用程序(C#)没有问题。在ASP.NET网站中使用Dll
现在,我想在我的ASP.NET网站(C#)使用,我将其导入像我的Windows应用程序是这样的:
[DllImport("mydll.dll")]
static extern int myfunc(int i);
但是当我运行我的网站,并使用MYFUNC方法就说明此错误:
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
我不知道是什么问题。
一些更多的信息:
这是64位的DLL。我有一个x64 cpu(英特尔酷睿i7)。我没有dll的源代码。我的本地计算机上有一个IIS,我正在测试它。
它在这里找到答案: http://stackoverflow.com/questions/23215518/target-32-bit-or-64-bit-native-dll-depending-on-environment – thirdDeveloper 2014-08-30 06:59:07