我有一個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