CR95HF.dll won’t load in Windows (8/10) 64-bit – System.BadImageFormatException

This goes for all non-managed DLLs which are 32-bit but have the .NET application loading them compiled with AnyCPU (and not x86).

If this message appears in the Event Viewer : System.BadImageFormatException related to a dll (in this case the CR95HF.dll for NFC) , download the Windows SDK for your Windows version. It will contain CorFlags.exe in \Program Files\Windows SDKs\Windows\v7.1\Bin\.

Simply set the header of the managed .NET .exe to 32bit;

\Program Files\Windows SDKs\Windows\v7.1\Bin\CorFlags.exe /32BIT+ YourApplication.exe

And try to run it again ; it likely will run without any issues!

 

 

 

 

 

Be the first to leave a comment. Don’t be shy.

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>