I set the following inside targetver.h:
#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#define _WIN32_WINDOWS 0x0501
and it still gets re-defined. However, when i create a simple new project that prints out GetTickCount(), it works fine on XP even without me having to define the above.
I did not change anything in the project settings. The only difference between the sample GetTickCount() that works and the one that doesn't is that it has plenty of other code around it and using it, but none of that code should be changing anything.
What could be causing this?
EDIT: One of the other files I was using was calling GetTickCount64() directly, and I did not know about this, so I assumed it was my own GetTickCount() function. Please ignore what i wrote above