Leaked source code of windows server 2003
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.

147 lines
4.0 KiB

  1. /****************************Module*Header******************************\
  2. * Module Name: GLOBALS.C
  3. *
  4. * Module Descripton: This file contains all the global variables
  5. *
  6. * Warnings:
  7. *
  8. * Issues:
  9. *
  10. * Public Routines:
  11. *
  12. * Created: 6 May 1996
  13. * Author: Srinivasan Chandrasekar [srinivac]
  14. *
  15. * Copyright (c) 1996, 1997 Microsoft Corporation
  16. \***********************************************************************/
  17. #include "mscms.h"
  18. #if DBG
  19. //
  20. // Global variable used for debugging purposes
  21. //
  22. DWORD gdwDebugControl = DBG_LEVEL_WARNING;
  23. #endif
  24. //
  25. // These are for loading & unloading CMMs and maintaining the CMM objects
  26. // in a chain in memory
  27. //
  28. PCMMOBJ gpCMMChain = NULL; // the list of used CMM by application
  29. PCMMOBJ gpPreferredCMM = NULL; // application specified preferred CMM
  30. char *gszCMMReqFns[] = {
  31. "CMGetInfo",
  32. #ifdef UNICODE
  33. "CMCreateTransformW",
  34. "CMCreateTransformExtW",
  35. #else
  36. "CMCreateTransform",
  37. "CMCreateTransformExt",
  38. #endif
  39. "CMDeleteTransform",
  40. "CMTranslateRGBs",
  41. "CMTranslateRGBsExt",
  42. "CMCheckRGBs",
  43. "CMCreateMultiProfileTransform",
  44. "CMTranslateColors",
  45. "CMCheckColors"
  46. };
  47. char *gszCMMOptFns[] = {
  48. #ifdef UNICODE
  49. "CMCreateProfileW",
  50. #else
  51. "CMCreateProfile",
  52. #endif
  53. "CMGetNamedProfileInfo",
  54. "CMConvertColorNameToIndex",
  55. "CMConvertIndexToColorName",
  56. "CMCreateDeviceLinkProfile",
  57. "CMIsProfileValid"
  58. };
  59. char *gszPSFns[] = {
  60. "CMGetPS2ColorSpaceArray",
  61. "CMGetPS2ColorRenderingIntent",
  62. "CMGetPS2ColorRenderingDictionary"
  63. };
  64. //
  65. // These are for registry paths
  66. //
  67. #if !defined(_WIN95_)
  68. TCHAR gszMonitorGUID[] = __TEXT("{4D36E96E-E325-11CE-BFC1-08002BE10318}");
  69. TCHAR gszDeviceClass[] = __TEXT("SYSTEM\\CurrentControlSet\\Control\\Class\\");
  70. TCHAR gszICMatcher[] = __TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ICM\\ICMatchers");
  71. TCHAR gszICMRegPath[] = __TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ICM");
  72. #else
  73. TCHAR gszICMatcher[] = __TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ICM\\ICMatchers");
  74. TCHAR gszICMRegPath[] = __TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ICM");
  75. TCHAR gszSetupPath[] = __TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup");
  76. TCHAR gszRegPrinter[] = __TEXT("System\\CurrentControlSet\\Control\\Print\\Printers");
  77. TCHAR gszICMDir[] = __TEXT("ICMPath");
  78. TCHAR gszPrinterData[] = __TEXT("PrinterDriverData");
  79. #endif
  80. TCHAR gszPrinter[] = __TEXT("prtr");
  81. TCHAR gszMonitor[] = __TEXT("mntr");
  82. TCHAR gszScanner[] = __TEXT("scnr");
  83. TCHAR gszLink[] = __TEXT("link");
  84. TCHAR gszAbstract[] = __TEXT("abst");
  85. TCHAR gszDefault[] = __TEXT("default");
  86. TCHAR gszFriendlyName[] = __TEXT("FriendlyName");
  87. TCHAR gszDeviceName[] = __TEXT("DriverDesc");
  88. TCHAR gszDisplay[] = __TEXT("DISPLAY");
  89. //
  90. // Default CMM dll
  91. //
  92. TCHAR gszDefaultCMM[] = __TEXT("icm32.dll");
  93. //
  94. // Synchronization objects
  95. //
  96. CRITICAL_SECTION critsec;
  97. //
  98. // Miscellaneous
  99. //
  100. TCHAR gszColorDir[] = __TEXT("COLOR");
  101. TCHAR gszBackslash[] = __TEXT("\\");
  102. //
  103. // Wellknown profile support
  104. //
  105. TCHAR gszRegisteredProfiles[] = __TEXT("RegisteredProfiles");
  106. TCHAR gszsRGBProfile[] = __TEXT("sRGB Color Space Profile.icm");
  107. TCHAR gszICMProfileListKey[] = __TEXT("CopyFiles\\ICM");
  108. TCHAR gszICMProfileListValue[] = __TEXT("ICMProfile");
  109. TCHAR gszFiles[] = __TEXT("Files");
  110. TCHAR gszDirectory[] = __TEXT("Directory");
  111. TCHAR gszModule[] = __TEXT("Module");
  112. TCHAR gszMSCMS[] = __TEXT("mscms.dll");
  113. TCHAR gszICMDeviceDataKey[] = __TEXT("ICMData");
  114. TCHAR gszICMProfileEnumMode[] = __TEXT("ProfileEnumMode");
  115. //
  116. // Scanner support
  117. //
  118. TCHAR gszStiDll[] = __TEXT("sti.dll");
  119. char gszStiCreateInstance[] = "StiCreateInstance";