.NET in general

Getting BadImageFormatException in 64-bit Windows?
17 January 2008 in .NET in general & Code-ing | Comments (37)

Have you been running/developing .NET programs in 64-bit Windows and met the BadImageFormatException? Well, Microsoft might say: “The exception that is thrown when the file image of a DLL or an executable program is invalid.” Which says absolutely nothing… :)

However, if it happens when using Platform Invove (P/Invoke or DllImport) or a third .NET party library (DLL) then you might have to set the project’s properties (or compilation flags) from “any” platform target to “x86″. Also, remember to set change to x86 in both the debug and release build configurations while you are at it, otherwise it might seem to only work when you are debugging and not in release compilation.

(This happened to me when I used a .NET code library for a LabJack device in a program and ran the program under 64-bit Vista. Couldn’t find what the nature of the problem “really” was… )

Cool App: C# Programmable Calculator
20 February 2006 in .NET in general & C# & Code-ing | Comments (0)

Say bye, bye to Windows’s standard calculator and say hello to the C# Programmable Calculator. C# Programmable Calculator is a reverse Polish notation calculator where you can customize (most) button functions by just reprogramming them in the C# programming language. And that is quite some fun! :cool:

C# Programmable Calculator

The whole source code is available on the website as well as the finished compiled product. It requires .NET framework 2.0, and Visual Studio 2005 to edit the source (or, SharpDevelop might suffice).


    April 2014
    M T W T F S S
    « Mar    
  • Categories