I have a dll file. I used it in a Windows Form Application (C#) without problem.
Now I want to use in my ASP.NET website (C#), and I import it like my Windows Application like this:
[DllImport( "mydll.dll" )]
static extern int myfunc(int i);
But when I run my web site and use myfunc method it shows this error:
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
I don't know what's the problem.
Some more info:
It's 64-bit dll. I have an x64 cpu (Intel core i7). I don't have source code of dll. I have an IIS on my local computer and I'm testing on it.