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.

135 lines
2.1 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. NDS_CONTEXT_HANDLE hADsContext,
  38. LPWSTR_LIST lpMandatoryProps,
  39. LPWSTR_LIST lpOptionalProps
  40. );
  41. typedef struct _classentry{
  42. BOOL bInUse;
  43. SYSTEMTIME st;
  44. WCHAR szTreeName[MAX_PATH];
  45. WCHAR szClassName[MAX_PATH];
  46. PPROPENTRY pPropList;
  47. }CLASSENTRY, *PCLASSENTRY;
  48. class CClassCache {
  49. public:
  50. HRESULT
  51. CClassCache::
  52. addentry(
  53. LPWSTR pszTreeName,
  54. LPWSTR pszClassName,
  55. PPROPENTRY pPropList
  56. );
  57. HRESULT
  58. CClassCache::
  59. findentry(
  60. LPWSTR pszTreeName,
  61. LPWSTR pszClassName,
  62. PDWORD pdwIndex
  63. );
  64. HRESULT
  65. CClassCache::
  66. getentry(
  67. LPWSTR pszTreeName,
  68. LPWSTR pszClassName,
  69. PPROPENTRY * ppPropList
  70. );
  71. CClassCache::
  72. CClassCache();
  73. CClassCache::
  74. ~CClassCache();
  75. static
  76. HRESULT
  77. CClassCache::
  78. CreateClassCache(
  79. CClassCache FAR * FAR * ppClassCache
  80. );
  81. DWORD
  82. CClassCache::
  83. IsOlderThan(
  84. DWORD i,
  85. DWORD j
  86. );
  87. protected:
  88. DWORD _dwMaxCacheSize;
  89. CLASSENTRY _ClassEntries[MAX_ENTRIES];
  90. CRITICAL_SECTION _cs;
  91. };
  92. HRESULT
  93. ValidatePropertyinCache(
  94. LPWSTR pszTreeName,
  95. LPWSTR pszClassName,
  96. LPWSTR pszPropName,
  97. CCredentials& Credentials,
  98. PDWORD pdwSyntaxId
  99. );
  100. HRESULT
  101. NdsGetClassInformation(
  102. LPWSTR pszTreeName,
  103. LPWSTR pszClassName,
  104. CCredentials& Credentials,
  105. PPROPENTRY * ppPropList
  106. );