This is an API feature available only in Vista and later. I would suggest that you run this code on XP.
To avoid accidentally using the API functions available only in later versions of Windows, you need to define the _WIN32_WINNT macro:
#define _WIN32_WINNT 0x502
If you do not install it, it usually defaults to 0x600 in later versions of the Windows SDK, choosing Vista as the target operating system. By the way, you probably have to discard condition variables. There are not enough details in your question to offer a suitable replacement. Code that uses mutexes instead can not be hard to find.
source share