I have a C # application (.NET 3.5, VS2005 Professional) that uses an unmanaged 32-bit library written in C / C ++. The API I use is as follows:
void * Initialize (int x);
voic GetData (void *);
And this works when I run it on Windows XP 32bit, but on Windows XP64bit it throws an exception:
Unhandled exception: System.Reflection.TargetInvocationException: The exception was thrown by the target of the call. ---> System.BadImageFormatException: An attempt was made to load a program with the wrong format. (Exception from HRESULT: 0x8007000B) on Aktuelizator.CommonLibrary.InitializeRingBuffer (Int32 dim) on Aktuelizator.AktuelizatorWService.AktuelizatorWS..ctor ()
These unmanaged DLLs work under the 64-bit version of XP when called from the 32-bit unmanages writetn application in C / C ++.
Does anyone have any ideas?
source
share