Recently, I've been trying--and failing-- to call a function from a C++ dynamic link library from a C# console application.. All is good, the compiling goes well on both ends, however! When I try call the function from the C++ DLL, I get this error :
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)coming from the C# console application. It'll break at the function calling part and give me that.
Here's the C# console application code.
And here's the C++ DLL code
I've googled the error many times, nobody seems to have a working solution. I'm running Windows XP Pro 64-bit.
Any help would be immensely appreciated.
Thanks for reading.
[Sorry if it's the wrong section]