Windows 7 problems?

Post your .Net discussions here
Post Reply
mijq
Newbie
Posts: 0
Joined: Wed Nov 03, 2010 12:03 pm

Windows 7 problems?

Post by mijq »

I have tried to port software I wrote for an XP machine to a Windows 7 running Visual Studio 2008 (VB.net).

The program compiles, but on execution terminates with an error at the ps3000_open_unit() call ({"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"} System.BadImageFormatException.

Does this come from a 16 bit windows 7 incompatiblity?

The funny thing is that when I download the example software and run it through the Visual Studio upgrade engine then it works fine.

Is there perhaps an upgraded SDK for VB.net?

mijq
Newbie
Posts: 0
Joined: Wed Nov 03, 2010 12:03 pm

Re: Windows 7 problems?

Post by mijq »

I found a kind of fix to the problem.

In Visual Studio the target platform can be changed from "Any CPU" to "x86". If you do this and change declarations in the PS3000.bas module from "short" to "Int16" it works.

A better fix would probably be to upgrade the PS3000.dll to use 32 bit integer values.

Your call.

Post Reply