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.

71 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. product.c
  5. Abstract:
  6. This file implements product type api for fax.
  7. Author:
  8. Wesley Witt (wesw) 12-Feb-1997
  9. Environment:
  10. User Mode
  11. --*/
  12. #include <windows.h>
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #include <tchar.h>
  16. #include "faxreg.h"
  17. #include "faxutil.h"
  18. BOOL
  19. ValidateProductSuite(
  20. WORD SuiteMask
  21. )
  22. {
  23. OSVERSIONINFOEX OsVersionInfo;
  24. OsVersionInfo.dwOSVersionInfoSize = sizeof(OsVersionInfo);
  25. if (!GetVersionEx((OSVERSIONINFO *) &OsVersionInfo)) {
  26. DebugPrint(( TEXT("Couldn't GetVersionEx(), ec = %d\n"), GetLastError() ));
  27. return FALSE;
  28. }
  29. return ((OsVersionInfo.wSuiteMask & SuiteMask) != 0) ;
  30. }
  31. DWORD
  32. GetProductType(
  33. VOID
  34. )
  35. {
  36. OSVERSIONINFOEX OsVersionInfo;
  37. OsVersionInfo.dwOSVersionInfoSize = sizeof(OsVersionInfo);
  38. if (!GetVersionEx((OSVERSIONINFO *) &OsVersionInfo)) {
  39. DebugPrint(( TEXT("Couldn't GetVersionEx(), ec = %d\n"), GetLastError() ));
  40. return 0;
  41. }
  42. if (OsVersionInfo.wProductType == VER_NT_WORKSTATION) {
  43. return PRODUCT_TYPE_WINNT;
  44. }
  45. return PRODUCT_TYPE_SERVER;
  46. }