WINVER defines the minimum Windows system the program can run on. There's a more detailed explanation at MSDN. What #define WINVER 0x0501
means is that the program requires Windows XP or Server 2003 to run, and that it therefore can use Windows functionality up through that release.