Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27124

VS 2008 An attempt was made to load a program with an incorrect format

$
0
0
Hi

I really could do with some help here as I am going absolutely round in circles trying to solve it. I have two computers, one PC running VS2008 that I use to develop my apps on and another without VS. The latter runs XP Pro 32bit and the former runs Vista 32bit.

I have written a small app that calls into a third party DLL for some sensors that I have, it is very simple just two DLL imports and then I attempt to read the data from the sensors and put them in a label.

The app works on my PC with Visual Studio without an issue but refuses to load (breaks when the DLL is called, passes the imports) on my second PC and gives the "An attempt was made to load a program with an incorrect format (Exception from HRESULT: 0x8007000B)" error. Every bit of research I have done points this down to a mismatch between trying to call a 32bit DLL from a 64bit OS, how can I get that error if both of my OS's are 32 bit! I have tried recompiling the program to be x86 rather than AnyCPU but that makes no difference. I have also repaired my .net frameworks. Both PC's have the same .net frameworks except for PC #2 has 1.1 but my first does not have any the 1.x frameworks. I can't see that would be a problem as it works on the PC's without the 1.x frameworks. I don't have the source for the DLL but I understand it was written in C++.

Does anyone have any ideas I could try please?

Thanks.

Viewing all articles
Browse latest Browse all 27124

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>