Forms Display component: An attempt was made to load a program with an incorrect format

When opening the StreamDisplay tutorial code (Cvb.Net) from CVB 13.03.000 x64 with VS19, I encounter an “attempt was made to load a program with an incorrect format” exception when trying to load the main form.

This doesn’t seem to originate from a target platform misconfiguration. There’s actually no variant that would let me pull a Display component from the toolbox into the form in Designer.

As I use this tutorial code occasionally for quick testing, I’m pretty sure this is a new behaviour in the latest CVB version.

Interestingly, the StreamHandler control for v1.82.0.0 works, the Display component however yields this exception.

Are you able to verify this observation?

1 Like

Hi @MarSch

have you changed the project properties accordingly? What does the “prefer 32 bit” option look like in your current configuration?

Doesn’t have to do with the compiler setting - he’s talking about a design-time issue as far as I can tell. @MarSch: I see it too - looking into it right now. This is probably a dependency issue on the unmanaged DLLs that we had to copy to W:\Windows\SysWOW64 for the GDI-based display to work inside the VS designer… I’ll get back to you asap…

1 Like

Ok. This was caused by a renamed DLL not making its way to all the various locations where it’s needed. If you take the file from the attached zip archive and put it into the C:\Windows\SysWOW64 folder it should work again. (269.8 KB)

It should probably be pointed out that with the Win32 build of CVB this won’t be necessary…

1 Like

Perfect, thanks a lot.

1 Like