BadImageFormatException while calling DLL in C# winx64 system? Why it gives error?
C#
1
Posts
1
Posters
0
Views
1
Watching
-
1. I created my own DLL in C++ (MyMathDll.dll), wrote a client program in c#. The program works on x86 system (32bit) but when i run it on x64 (64bit vista), I get the error, BadImageFormatException. It is simple function which adds two numbers as follows
int _cdecl Add(int x, int y)
{
return (x+y);
}2. I have another problem with x86 windows. It is not able to load or even locate a particular dll. The dll was made with nmake utility? Could there be something wrong with the DLL. It locates other dlls fine. I verified this DLL in dumpbin and it looks good. Why it is not loadig?