I had to write an simple application with some specific requirements:
1. It should consist of just one exe-file, no installer or external DLL's
2. It should be small
3. It should run on any Windows (Win32) platform (at least on Windows XP), without making any modifications to the Windows installation (no dependencies to .NET, JVM, MFC or Visual Studio redistributables)
4. It should have a simple (dialog based) UI
I decided to do it as a simple Win32 Application in C (C++) and using only the standard win32 api, no fancy stuff. I created the project with Visual Studio 2010 on 64 bit Windows 7 and changed Runtime Library from Multi-threaded DLL to just Multi-threaded. I thought this would produce the most Windows-compatible application possible.
The compiled application works fine on my Windows 7, but I cannot get it to start on any Windows XP PC. I have tried both on Windows XP SP2 and SP3. The strange thing is that I don't get any error message and no rogue processes in the Activity Manager, nothing happens when I double-click the exe-file. And there is no DrWatson log produced.
I have checked the Target Machine in project settings and it is MachineX86.
I have googled a lot on the problem, and one tip was to modify targetver.h, which I have done without result. This is what my targetver.h looks like right now:
#include <WinSDKVer.h>
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#include <SDKDDKVer.h>
I have also tried dependency walker, but it only shows and error for a delay-loaded DLL called DWMAPI.DLL, which seems to be a Vista DLL. And also warnings for two other delay-loaded DLL's, MPR.DLL and SHLWAPI.DLL. But since they are delay-loaded and I don't think I use anything in them it shouldn't matter (googling on it shows that these warnings should be disregarded).
My goal is to be able to compile an exe that will work on the XP-machines without making any modification to them.