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.

143 lines
2.4 KiB

  1. #define MAX_ENTRIES 20
  2. typedef struct _propentry{
  3. DWORD dwSyntaxId;
  4. LPWSTR pszPropName;
  5. struct _propentry *pNext;
  6. } PROPENTRY, *PPROPENTRY;
  7. PPROPENTRY
  8. CopyPropList(
  9. PPROPENTRY pPropList
  10. );
  11. HRESULT
  12. FindProperty(
  13. PPROPENTRY pPropList,
  14. LPWSTR pszPropName,
  15. PDWORD pdwSyntaxId
  16. );
  17. PPROPENTRY
  18. CreatePropertyEntry(
  19. LPWSTR pszPropertyName,
  20. DWORD dwSyntaxId
  21. );
  22. void
  23. FreePropertyEntry(
  24. PPROPENTRY pPropName
  25. );
  26. void
  27. FreePropertyList(
  28. PPROPENTRY pPropList
  29. );
  30. PPROPENTRY
  31. GeneratePropertyList(
  32. LPWSTR_LIST lpMandatoryProps,
  33. LPWSTR_LIST lpOptionalProps
  34. );
  35. PPROPENTRY
  36. GenerateAttrIdList(
  37. HANDLE hTree,
  38. LPWSTR_LIST lpMandatoryProps,
  39. LPWSTR_LIST lpOptionalProps
  40. );
  41. PPROPENTRY
  42. GeneratePropertyAndIdList(
  43. LPWSTR pszTreeName,
  44. CCredentials& Credentials,
  45. LPWSTR_LIST lpMandatoryProps,
  46. LPWSTR_LIST lpOptionalProps
  47. );
  48. typedef struct _classentry{
  49. BOOL bInUse;
  50. SYSTEMTIME st;
  51. WCHAR szTreeName[MAX_PATH];
  52. WCHAR szClassName[MAX_PATH];
  53. PPROPENTRY pPropList;
  54. }CLASSENTRY, *PCLASSENTRY;
  55. class CClassCache {
  56. public:
  57. HRESULT
  58. CClassCache::
  59. addentry(
  60. LPWSTR pszTreeName,
  61. LPWSTR pszClassName,
  62. PPROPENTRY pPropList
  63. );
  64. HRESULT
  65. CClassCache::
  66. findentry(
  67. LPWSTR pszTreeName,
  68. LPWSTR pszClassName,
  69. PDWORD pdwIndex
  70. );
  71. HRESULT
  72. CClassCache::
  73. getentry(
  74. LPWSTR pszTreeName,
  75. LPWSTR pszClassName,
  76. PPROPENTRY * ppPropList
  77. );
  78. CClassCache::
  79. CClassCache();
  80. CClassCache::
  81. ~CClassCache();
  82. static
  83. HRESULT
  84. CClassCache::
  85. CreateClassCache(
  86. CClassCache FAR * FAR * ppClassCache
  87. );
  88. DWORD
  89. CClassCache::
  90. IsOlderThan(
  91. DWORD i,
  92. DWORD j
  93. );
  94. protected:
  95. DWORD _dwMaxCacheSize;
  96. CLASSENTRY _ClassEntries[MAX_ENTRIES];
  97. CRITICAL_SECTION _cs;
  98. };
  99. HRESULT
  100. ValidatePropertyinCache(
  101. LPWSTR pszTreeName,
  102. LPWSTR pszClassName,
  103. LPWSTR pszPropName,
  104. CCredentials& Credentials,
  105. PDWORD pdwSyntaxId
  106. );
  107. HRESULT
  108. NdsGetClassInformation(
  109. LPWSTR pszTreeName,
  110. LPWSTR pszClassName,
  111. CCredentials& Credentials,
  112. PPROPENTRY * ppPropList
  113. );