I have to use a third party DLL in my application. The DLL is a 32-bit and the system I am using is 64-bit OS.
I have Imported the 32-bit DLL in my DotNet application (framework-4.5) as below
[DllImport("Sample.dll",
EntryPoint = "Add",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern int Add(int iA, int iB);
In IIS 7.5 - I have set "Enable 32-bit Application" as "True".
And also tried setting the Compiler Manager as - X86, x64 and Any CPU.
But all the attempt results in same Error as
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
How to resolve this Issue......