In VS9, when i call the GetTickCount() function, it automatically converts it into the GetTickCount64() function upon compilation. This second function only works on Vista+, and thus my program errors when run on XP.

I have tried adding the follow in 'targetver.h', but it did not make a difference:

#define WINVER         0x0501
#define _WIN32_WINNT   0x0501
#define _WIN32_WINDOWS 0x0501

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.

How can I 'over-ride' this so that it calls the original GetTickCount() ?

Thanks

I figured it out. In another cpp file i had a function that was calling GetTickCount64() directly, and I just assumed that it was my GetTickCount() being re-defined.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.