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.

209 lines
4.2 KiB

  1. typedef struct _property{
  2. LPWSTR szPropertyName;
  3. DWORD dwFlags;
  4. DWORD dwNumValues; // Number of values
  5. DWORD dwSyntaxId; // NDS Syntax Id
  6. PNDSOBJECT pNdsObject; // Pointer to the NDS Object
  7. }PROPERTY, *PPROPERTY;
  8. #define PROPERTY_NAME(pProperty) pProperty->szPropertyName
  9. #define PROPERTY_VALUES(pProperty) pProperty->lpValues
  10. #define PROPERTY_NUMVALUES(pProperty) pProperty->dwNumValues
  11. #define PROPERTY_SYNTAX(pProperty) pProperty->dwSyntaxId
  12. #define PROPERTY_NDSOBJECT(pProperty) pProperty->pNdsObject
  13. #define PROPERTY_FLAGS(pProperty) pProperty->dwFlags
  14. #define CACHE_PROPERTY_INITIALIZED 0x0
  15. #define CACHE_PROPERTY_MODIFIED 0x1
  16. #define CACHE_PROPERTY_CLEARED 0x2
  17. #define CACHE_PROPERTY_APPENDED 0x3
  18. #define CACHE_PROPERTY_DELETED 0x4
  19. class CPropertyCache {
  20. public:
  21. HRESULT
  22. CPropertyCache::
  23. addproperty(
  24. LPWSTR szPropertyName,
  25. DWORD dwSyntaxId
  26. );
  27. HRESULT
  28. CPropertyCache::
  29. updateproperty(
  30. LPWSTR szPropertyName,
  31. DWORD dwSyntaxId,
  32. DWORD dwNumValues,
  33. PNDSOBJECT pNdsObject,
  34. BOOL fExplicit
  35. );
  36. HRESULT
  37. CPropertyCache::
  38. findproperty(
  39. LPWSTR szPropertyName,
  40. PDWORD pdwIndex
  41. );
  42. HRESULT
  43. CPropertyCache::
  44. deleteproperty(
  45. DWORD dwIndex
  46. );
  47. HRESULT
  48. CPropertyCache::
  49. getproperty(
  50. LPWSTR szPropertyName,
  51. PDWORD pdwSyntaxId,
  52. PDWORD pdwNumValues,
  53. PNDSOBJECT * ppNdsObject
  54. );
  55. HRESULT
  56. CPropertyCache::
  57. unboundgetproperty(
  58. LPWSTR szPropertyName,
  59. PDWORD pdwSyntaxId,
  60. PDWORD pdwNumValues,
  61. PNDSOBJECT * ppNdsObject
  62. );
  63. HRESULT
  64. CPropertyCache::
  65. unboundgetproperty(
  66. DWORD dwIndex,
  67. PDWORD pdwSyntaxId,
  68. PDWORD pdwNumValues,
  69. PNDSOBJECT * ppNdsObject
  70. );
  71. HRESULT
  72. CPropertyCache::
  73. putproperty(
  74. LPWSTR szPropertyName,
  75. DWORD dwFlags,
  76. DWORD dwSyntaxId,
  77. DWORD dwNumValues,
  78. PNDSOBJECT pNdsObject
  79. );
  80. void
  81. CPropertyCache::
  82. flushpropcache();
  83. void
  84. CPropertyCache::
  85. reset_propindex(
  86. );
  87. BOOL
  88. CPropertyCache::
  89. index_valid(
  90. );
  91. BOOL
  92. CPropertyCache::
  93. index_valid(
  94. DWORD dwIndex
  95. );
  96. HRESULT
  97. CPropertyCache::
  98. skip_propindex(
  99. DWORD dwElements
  100. );
  101. HRESULT
  102. CPropertyCache::
  103. get_PropertyCount(
  104. PDWORD pdwMaxProperties
  105. );
  106. DWORD
  107. CPropertyCache::
  108. get_CurrentIndex(
  109. );
  110. LPWSTR
  111. CPropertyCache::
  112. get_CurrentPropName(
  113. );
  114. LPWSTR
  115. CPropertyCache::
  116. get_PropName(
  117. DWORD dwIndex
  118. );
  119. CPropertyCache::
  120. CPropertyCache();
  121. CPropertyCache::
  122. ~CPropertyCache();
  123. static
  124. HRESULT
  125. CPropertyCache::
  126. createpropertycache(
  127. CCoreADsObject FAR * pCoreADsObject,
  128. CPropertyCache FAR * FAR * ppPropertyCache
  129. );
  130. HRESULT
  131. CPropertyCache::
  132. unmarshallproperty(
  133. LPWSTR szPropertyName,
  134. LPBYTE lpValue,
  135. DWORD dwNumValues,
  136. DWORD dwSyntaxId,
  137. BOOL fExplicit
  138. );
  139. HRESULT
  140. CPropertyCache::
  141. NDSUnMarshallProperties(
  142. HANDLE hOperationData,
  143. BOOL fExplicit
  144. );
  145. HRESULT
  146. CPropertyCache::
  147. marshallproperty(
  148. HANDLE hOperationData,
  149. LPWSTR szPropertyName,
  150. DWORD dwFlags,
  151. LPBYTE lpValues,
  152. DWORD dwNumValues,
  153. DWORD dwSyntaxId
  154. );
  155. HRESULT
  156. CPropertyCache::
  157. NDSMarshallProperties(
  158. HANDLE hOperationData
  159. );
  160. protected:
  161. DWORD _dwMaxProperties;
  162. DWORD _dwCurrentIndex;
  163. PPROPERTY _pProperties;
  164. DWORD _cb;
  165. CCoreADsObject FAR * _pCoreADsObject;
  166. };
  167.