Testing for other conditions involves a simple modification to this code. For example, the following code verifies that the application is running on Windows 2000 Professional.BOOL Is_Win2000_Professional () 
{
   OSVERSIONINFOEX osvi;
   DWORDLONG dwlConditionMask = 0;   // Initialize the OSVERSIONINFOEX structure.   ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
   osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
   osvi.dwMajorVersion = 5;
   osvi.wProductType = VER_NT_WORKSTATION;   // Initialize the condition mask.   VER_SET_CONDITION( dwlConditionMask, VER_MAJORVERSION, 
      VER_GREATER_EQUAL );
   VER_SET_CONDITION( dwlConditionMask, VER_PRODUCT_TYPE, 
      VER_EQUAL );   // Perform the test.   return VerifyVersionInfo(
      &osvi, 
      VER_MAJORVERSION | VER_PRODUCT_TYPE,
      dwlConditionMask);
}