Test and Measurement Forum

Windows 7 problems?

Post your .Net discussions here

Windows 7 problems?

Postby mijq » Wed Mar 02, 2011 11:02 am

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?

Postby mijq » Thu Mar 03, 2011 8:21 am

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.
mijq
Newbie
 
Posts: 0
Joined: Wed Nov 03, 2010 12:03 pm


Return to .Net Languages (C#, VB.Net, .)

Who is online

Users browsing this forum: No registered users and 1 guest