Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
669 B

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. #include <windows.h>
  3. #include <stdio.h>
  4. void main(void)
  5. {
  6. // DWORD dwError;
  7. OSVERSIONINFOEX osVersionInfo;
  8. DWORDLONG dwlConditionMask = 0;
  9. ZeroMemory(&osVersionInfo, sizeof(OSVERSIONINFOEX));
  10. osVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
  11. osVersionInfo.wSuiteMask = VER_SUITE_TERMINAL;
  12. VER_SET_CONDITION( dwlConditionMask, VER_SUITENAME, VER_AND );
  13. BOOL bTsPresent = VerifyVersionInfo(
  14. &osVersionInfo,
  15. VER_SUITENAME,
  16. dwlConditionMask
  17. );
  18. printf("VerifyVersionInfo says TerminalServices is %s", bTsPresent ? "ON" : "OFF");
  19. }
  20. // eof