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.

131 lines
2.8 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1997
  5. //
  6. // File: cstore.hxx
  7. //
  8. // Contents: Main Precompiled header for Directory Class Access Implementation
  9. //
  10. //
  11. // Author: DebiM
  12. //
  13. //-------------------------------------------------------------------------
  14. #include "dsbase.hxx"
  15. #include "comcat.h"
  16. #include "cclstor.hxx"
  17. #include "cscaten.hxx"
  18. #include "csenum.hxx"
  19. #include "csevents.h"
  20. #include "cspath.hxx"
  21. #include "cslang.hxx"
  22. typedef struct tagCLASSCONTAINER
  23. {
  24. IClassAccess *gpClassStore;
  25. LPOLESTR pszClassStorePath;
  26. UINT cBindFailures;
  27. UINT cAccess;
  28. UINT cNotFound;
  29. } CLASSCONTAINER, *PCLASSCONTAINER;
  30. #include "cclsto.hxx"
  31. #include "cclsacc.hxx"
  32. #include "csguid.h"
  33. #include <appmgmt.h>
  34. long CompareUsn(CSUSN *pUsn1, CSUSN *pUsn2);
  35. HRESULT GetUserSyncPoint(LPWSTR pszContainer, CSUSN *pPrevUsn);
  36. HRESULT AdvanceUserSyncPoint(LPWSTR pszContainer);
  37. void GetDefaultPlatform(CSPLATFORM *pPlatform);
  38. #define MAX_BIND_ATTEMPTS 10
  39. #define MAXCLASSSTORES 20
  40. //
  41. // Link list structure for ClassContainers Seen
  42. //
  43. //
  44. // Cached Class Store Bindings
  45. //
  46. typedef struct CachedBindings_t {
  47. LPOLESTR szStorePath;
  48. IClassAccess *pIClassAccess;
  49. HRESULT Hr;
  50. PSID Sid;
  51. } BindingsType;
  52. typedef struct ClassStoreCache_t {
  53. BindingsType Bindings[MAXCLASSSTORES];
  54. DWORD start, end, sz;
  55. } ClassStoreCacheType;
  56. //
  57. // Link list structure for User Profiles Seen
  58. //
  59. typedef struct tagUSERPROFILE
  60. {
  61. PSID pCachedSid;
  62. PCLASSCONTAINER *pUserStoreList;
  63. DWORD cUserStoreCount;
  64. tagUSERPROFILE *pNextUser;
  65. } USERPROFILE;
  66. #if defined(_X86_)
  67. #define DEFAULT_ARCHITECTURE PROCESSOR_ARCHITECTURE_INTEL
  68. #elif defined(_ALPHA_)
  69. #define DEFAULT_ARCHITECTURE PROCESSOR_ARCHITECTURE_ALPHA
  70. #elif defined(_IA64_)
  71. #define DEFAULT_ARCHITECTURE PROCESSOR_ARCHITECTURE_IA64
  72. #else
  73. #define DEFAULT_ARCHITECTURE PROCESSOR_ARCHITECTURE_UNKNOWN
  74. #endif
  75. #define CS_CALL_LOCALSYSTEM 1
  76. #define CS_CALL_USERPROCESS 2
  77. #define CS_CALL_IMPERSONATED 3
  78. //------------------------- Priorities and weights
  79. //
  80. // File Extension priority
  81. //
  82. // 1 bit (0)
  83. //
  84. #define PRI_EXTN_FACTOR (1 << 0)
  85. //
  86. // CLSCTX priority
  87. //
  88. // 2 bits (7:8)
  89. //
  90. #define PRI_CLSID_INPSVR (3 << 7)
  91. #define PRI_CLSID_LCLSVR (2 << 7)
  92. #define PRI_CLSID_REMSVR (1 << 7)
  93. //
  94. // UI Language priority
  95. //
  96. // 3 bits (9:11)
  97. //
  98. #define PRI_LANG_ALWAYSMATCH (4 << 9)
  99. #define PRI_LANG_SYSTEMLOCALE (3 << 9)
  100. #define PRI_LANG_ENGLISH (2 << 9)
  101. #define PRI_LANG_NEUTRAL (1 << 9)
  102. //
  103. // Architecture priority
  104. //
  105. // 2 bits (12:13)
  106. //
  107. #define PRI_ARCH_PREF1 (2 << 12)
  108. #define PRI_ARCH_PREF2 (1 << 12)