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.

210 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. DWORD dwNumValues,
  27. PNDSOBJECT pNdsObject
  28. );
  29. HRESULT
  30. CPropertyCache::
  31. updateproperty(
  32. LPWSTR szPropertyName,
  33. DWORD dwSyntaxId,
  34. DWORD dwNumValues,
  35. PNDSOBJECT pNdsObject,
  36. BOOL fExplicit
  37. );
  38. HRESULT
  39. CPropertyCache::
  40. findproperty(
  41. LPWSTR szPropertyName,
  42. PDWORD pdwIndex
  43. );
  44. HRESULT
  45. CPropertyCache::
  46. deleteproperty(
  47. DWORD dwIndex
  48. );
  49. HRESULT
  50. CPropertyCache::
  51. getproperty(
  52. LPWSTR szPropertyName,
  53. PDWORD pdwSyntaxId,
  54. PDWORD pdwNumValues,
  55. PNDSOBJECT * ppNdsObject
  56. );
  57. HRESULT
  58. CPropertyCache::
  59. unboundgetproperty(
  60. LPWSTR szPropertyName,
  61. PDWORD pdwSyntaxId,
  62. PDWORD pdwNumValues,
  63. PNDSOBJECT * ppNdsObject
  64. );
  65. HRESULT
  66. CPropertyCache::
  67. unboundgetproperty(
  68. DWORD dwIndex,
  69. PDWORD pdwSyntaxId,
  70. PDWORD pdwNumValues,
  71. PNDSOBJECT * ppNdsObject
  72. );
  73. HRESULT
  74. CPropertyCache::
  75. putproperty(
  76. LPWSTR szPropertyName,
  77. DWORD dwFlags,
  78. DWORD dwSyntaxId,
  79. DWORD dwNumValues,
  80. PNDSOBJECT pNdsObject
  81. );
  82. void
  83. CPropertyCache::
  84. flushpropcache();
  85. void
  86. CPropertyCache::
  87. reset_propindex(
  88. );
  89. BOOL
  90. CPropertyCache::
  91. index_valid(
  92. );
  93. BOOL
  94. CPropertyCache::
  95. index_valid(
  96. DWORD dwIndex
  97. );
  98. HRESULT
  99. CPropertyCache::
  100. skip_propindex(
  101. DWORD dwElements
  102. );
  103. HRESULT
  104. CPropertyCache::
  105. get_PropertyCount(
  106. PDWORD pdwMaxProperties
  107. );
  108. DWORD
  109. CPropertyCache::
  110. get_CurrentIndex(
  111. );
  112. LPWSTR
  113. CPropertyCache::
  114. get_CurrentPropName(
  115. );
  116. LPWSTR
  117. CPropertyCache::
  118. get_PropName(
  119. DWORD dwIndex
  120. );
  121. CPropertyCache::
  122. CPropertyCache();
  123. CPropertyCache::
  124. ~CPropertyCache();
  125. static
  126. HRESULT
  127. CPropertyCache::
  128. createpropertycache(
  129. CCoreADsObject FAR * pCoreADsObject,
  130. CPropertyCache FAR * FAR * ppPropertyCache
  131. );
  132. HRESULT
  133. CPropertyCache::
  134. unmarshallproperty(
  135. LPWSTR szPropertyName,
  136. PNDSOBJECT pNdsObject,
  137. DWORD dwNumValues,
  138. DWORD dwSyntaxId,
  139. BOOL fExplicit
  140. );
  141. HRESULT
  142. CPropertyCache::
  143. NDSUnMarshallProperties(
  144. HANDLE hOperationData,
  145. BOOL fExplicit
  146. );
  147. HRESULT
  148. CPropertyCache::
  149. marshallproperty(
  150. NDS_CONTEXT_HANDLE hADsContext,
  151. NDS_BUFFER_HANDLE hOperationData,
  152. LPWSTR szPropertyName,
  153. DWORD dwFlags,
  154. PNDSOBJECT lpValues,
  155. DWORD dwNumValues,
  156. DWORD dwSyntaxId
  157. );
  158. HRESULT
  159. CPropertyCache::
  160. NDSMarshallProperties(
  161. NDS_CONTEXT_HANDLE hADsContext,
  162. NDS_BUFFER_HANDLE hOperationData
  163. );
  164. protected:
  165. DWORD _dwMaxProperties;
  166. DWORD _dwCurrentIndex;
  167. PPROPERTY _pProperties;
  168. DWORD _cb;
  169. CCoreADsObject FAR * _pCoreADsObject;
  170. };
  171.