BadImageFormatException when loading 32 bit DLL, target is x86
Posted
by Coder
on Stack Overflow
See other posts from Stack Overflow
or by Coder
Published on 2010-04-28T10:20:18Z
Indexed on
2010/04/28
10:43 UTC
Read the original article
Hit count: 701
I have a DLL (FreeType) which is certainly 32-bit (header: IMAGE_FILE_MACHINE_I386).
I want to use it from C# code, using DllImport.
Target of my application is x86, IntPtr.Size is 4, process is 32-bit.
But I get BadImageFormatException (Exception from HRESULT: 0x8007000B). What can be wrong?
Of course I use 64-bit Windows 7.
© Stack Overflow or respective owner