Recently I came across an awesome open source application called My Exposé by Simon Ferquel. It uses Window’s Vista’s api to give Vista the same Exposé feature that you would find on a Mac. Using Vista’s api, it creates live thumbnails of your running applications. Pretty Nifty! The only problem was it didn’t work in 64bit versions of Vista!
So I set out on finding a solution.
(**Edit** If you are looking for a good Exposé clone, check out my article: Exposé Clones Reviewed)
After downloading the source and getting it to build in Visual Studio 2008, I was greeted with a BadImageFormatException.
The fix was extremely easy. It took 3 steps:
1. Go to “Build->Configuration Manager.”
2. Change the project’s platform from “Any CPU” to “x86.” Because x86 isn’t listed you first must click “<New…>.”
3. Add x86. If you chose x64 it would work on 64bit Vista, but not on 32bit Vista. x86 should work on both versions.
That’s it! After clicking “OK” and rebuilding the project, It should work! At least it did for me!




13 Comments
I understand that x86 should work on both 32 bit and 64 bit vista. I understand why x64 should work only on 64 bit vista. But I don’t understand why Any CPU doesn’t work at all.
Hello there,
I’m trying to get it to compile in VS2008 under Vista x64, but the launcher fails to build. It spews at me the following error message:
E:\Downloads\expose\MyExposeLauncher\App.xaml.cs(57,44): error CS1061: ‘MyExposeLauncher.Properties.Settings’ does not contain a definition for ‘TriggerManager’ and no extension method ‘TriggerManager’ accepting a first argument of type ‘MyExposeLauncher.Properties.Settings’ could be found (are you missing a using directive or an assembly reference?)
E:\Downloads\expose\MyExposeLauncher\Configurator.xaml.cs(36,54): error CS1061: ‘MyExposeLauncher.Properties.Settings’ does not contain a definition for ‘TriggerManager’ and no extension method ‘TriggerManager’ accepting a first argument of type ‘MyExposeLauncher.Properties.Settings’ could be found (are you missing a using directive or an assembly reference?)
I don’t know anything about programming in VS, so maybe I’m missing something when converting the project… I just click ‘convert’. You mention ‘getting it to build in vs2008′, but I have no idea how to do that
I also had that problem.
To fix this I had to change a bit of the code that dealt with saving settings. Here’s what I changed:
1. In App.xaml.cs I commented out lines 43-44 and 52-58.
2. In Configurator.xaml.cs I changed line 36 from:
m_oManager = Properties.Settings.Default.TriggerManager;
To:
m_oManager = new TriggerManager();
3. In Configurator.xaml.cs I commented lines 94 and 95.
I’m pretty sure that was it. I rebuilt the project and it worked! Let me know how it goes!
Thanks, the project compiles now, but… even though I’ve tried building for x86 and x64, neither works… I’m using Vista x64 SP1, and it just tells me that myexposelauncher.exe has stopped working. I replaced all the dlls in the installation as well as the exe with the newly compiled files, yet no dice :S
Maybe try changing it from Release to Debug. Once in Debug you may need to go back to the configuration manager and change it back to x86 again.

I almost forgot… If you have multiple monitors… it might crash. I added this bit of code to ExposeWindow.cpp line 322 in the MyExpose Project:
if(screen->Bounds.Left<0 || screen->Bounds.Right<0 || screen->Bounds.Top<0 || screen->Bounds.Bottom<0)
{
continue;
}
I’m pretty sure that was the last code change I made.
I rebuilt with Debug… still crashes when I start it. I only have one monitor. It’s a mystery
…maybe you could send me your working executable? I bet that that too will crash on my comp. I hope you can see my e-mail as the admin.
If my build doesn’t work check out my blog Exposé Clones Reviewed. There you can find a good alternative to My Exposé .
Unfortunately, it didn’t work, it didn’t even install :S But, I checked your article out and installed Switcher, which does the job perfectly, so thanks a lot!
I’m glad Switcher works!
hey I don’t have VS, is there any chance you could post your rebuilt binary? I don’t know if the author has been completely clear on the licence terms. I saw your comment on his blog, have you heard from him?
For those interested… here is a link to my rebuild. Disclaimer: In order for me to get it to run on my machine, I also had to remove some of My Exposé’s settings functionality. If all you want is an Exposé clone that works on Vista 64 check out my other post called Exposé Clones Reviewed There are better Exposé clones out there than My Exposé.