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.

351 lines
8.9 KiB

  1. // pstorec.idl : IDL source for pstorec.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (pstorec.tlb) and marshalling code.
  5. import "wtypes.idl";
  6. import "..\..\common\dpapi\pstypes.idl";
  7. [
  8. object,
  9. uuid(5A6F1EC1-2DB1-11D0-8C39-00C04FD9126B),
  10. helpstring("IEnumPStoreItems Interface"),
  11. pointer_default(unique)
  12. ]
  13. interface IEnumPStoreItems : IUnknown
  14. {
  15. import "oaidl.idl";
  16. // gets the next items
  17. HRESULT Next(
  18. [in] DWORD celt,
  19. [out] LPWSTR *rgelt,
  20. [in, out] DWORD *pceltFetched
  21. );
  22. // skips the requested number of items
  23. HRESULT Skip(
  24. [in] DWORD celt
  25. );
  26. // resets the enumeration
  27. HRESULT Reset();
  28. // clones the interface
  29. HRESULT Clone(
  30. [out] IEnumPStoreItems **ppenum
  31. );
  32. };
  33. [
  34. object,
  35. uuid(789C1CBF-31EE-11d0-8C39-00C04FD9126B),
  36. helpstring("IEnumPStoreTypes Interface"),
  37. pointer_default(unique)
  38. ]
  39. interface IEnumPStoreTypes : IUnknown
  40. {
  41. import "oaidl.idl";
  42. // gets the next requested number of types
  43. HRESULT Next(
  44. [in] DWORD celt,
  45. [size_is(*pceltFetched)]
  46. [out] GUID *rgelt,
  47. [in, out] DWORD *pceltFetched
  48. );
  49. // skips the requested number of types
  50. HRESULT Skip(
  51. [in] DWORD celt
  52. );
  53. // resets the enumeration
  54. HRESULT Reset();
  55. // clones the interface
  56. HRESULT Clone(
  57. [out] IEnumPStoreTypes **ppenum
  58. );
  59. };
  60. [
  61. object,
  62. uuid(5A6F1EC0-2DB1-11D0-8C39-00C04FD9126B),
  63. helpstring("IPStore Interface"),
  64. pointer_default(unique)
  65. ]
  66. interface IPStore : IUnknown
  67. {
  68. import "oaidl.idl";
  69. // METHODS
  70. // GetInfo - returns information on the provider
  71. HRESULT GetInfo(
  72. [out] PPST_PROVIDERINFO *ppProperties
  73. );
  74. // GetProvParam - gets the specificed parameter information
  75. HRESULT GetProvParam(
  76. [in] DWORD dwParam,
  77. [out] DWORD *pcbData,
  78. [out][size_is(,*pcbData)]
  79. BYTE **ppbData,
  80. [in] DWORD dwFlags
  81. );
  82. // SetProvParam - sets the specificed parameter information
  83. HRESULT SetProvParam(
  84. [in] DWORD dwParam,
  85. [in] DWORD cbData,
  86. [in][size_is(cbData)]
  87. BYTE *pbData,
  88. [in] DWORD dwFlags
  89. );
  90. // CreateType - creates a type
  91. HRESULT CreateType(
  92. [in] PST_KEY Key,
  93. [in] const GUID *pType,
  94. [in] PPST_TYPEINFO pInfo,
  95. [in] DWORD dwFlags
  96. );
  97. // GetTypeInfo - gets the information associated with a type
  98. HRESULT GetTypeInfo(
  99. [in] PST_KEY Key,
  100. [in] const GUID *pType,
  101. [out] PPST_TYPEINFO *ppInfo,
  102. [in] DWORD dwFlags
  103. );
  104. // DeleteType - deletes a type
  105. HRESULT DeleteType(
  106. [in] PST_KEY Key,
  107. [in] const GUID *pType,
  108. [in] DWORD dwFlags
  109. );
  110. // CreateSubtype - creates a type
  111. HRESULT CreateSubtype(
  112. [in] PST_KEY Key,
  113. [in] const GUID *pType,
  114. [in] const GUID *pSubtype,
  115. [in] PPST_TYPEINFO pInfo,
  116. [in] PPST_ACCESSRULESET pRules,
  117. [in] DWORD dwFlags
  118. );
  119. // GetSubtypeInfo - gets the information associated with a subtype
  120. HRESULT GetSubtypeInfo(
  121. [in] PST_KEY Key,
  122. [in] const GUID *pType,
  123. [in] const GUID *pSubtype,
  124. [out] PPST_TYPEINFO *ppInfo,
  125. [in] DWORD dwFlags
  126. );
  127. // DeleteType - deletes a subtype
  128. HRESULT DeleteSubtype(
  129. [in] PST_KEY Key,
  130. [in] const GUID *pType,
  131. [in] const GUID *pSubtype,
  132. [in] DWORD dwFlags
  133. );
  134. // ReadTypeAccessRuleset - reads the access rules for the given type
  135. HRESULT ReadAccessRuleset(
  136. [in] PST_KEY Key,
  137. [in] const GUID *pType,
  138. [in] const GUID *pSubtype,
  139. [out] PPST_ACCESSRULESET *ppRules,
  140. [in] DWORD dwFlags
  141. );
  142. // WriteTypeAccessRuleset - writes the access rules for the given type
  143. HRESULT WriteAccessRuleset(
  144. [in] PST_KEY Key,
  145. [in] const GUID *pType,
  146. [in] const GUID *pSubtype,
  147. [in] PPST_ACCESSRULESET pRules,
  148. [in] DWORD dwFlags
  149. );
  150. // EnumTypes - returns an interface for enumerating types
  151. HRESULT EnumTypes(
  152. [in] PST_KEY Key,
  153. [in] DWORD dwFlags,
  154. [in] IEnumPStoreTypes **ppenum
  155. );
  156. // EnumSubtypes - returns an interface for enumerating subtypes
  157. HRESULT EnumSubtypes(
  158. [in] PST_KEY Key,
  159. [in] const GUID *pType,
  160. [in] DWORD dwFlags,
  161. [in] IEnumPStoreTypes **ppenum
  162. );
  163. // DeleteItem - deletes item from the protected storage
  164. HRESULT DeleteItem(
  165. [in] PST_KEY Key,
  166. [in] const GUID *pItemType,
  167. [in] const GUID *pItemSubtype,
  168. [in] LPCWSTR szItemName,
  169. [in] PPST_PROMPTINFO pPromptInfo,
  170. [in] DWORD dwFlags
  171. );
  172. // ReadItem - reads item from the protected storage
  173. HRESULT ReadItem(
  174. [in] PST_KEY Key,
  175. [in] const GUID *pItemType,
  176. [in] const GUID *pItemSubtype,
  177. [in] LPCWSTR szItemName,
  178. [out] DWORD *pcbData,
  179. [out][size_is(,*pcbData)]
  180. BYTE **ppbData,
  181. [in] PPST_PROMPTINFO pPromptInfo,
  182. [in] DWORD dwFlags
  183. );
  184. // WriteItem - writes item to the protected storage
  185. HRESULT WriteItem(
  186. [in] PST_KEY Key,
  187. [in] const GUID *pItemType,
  188. [in] const GUID *pItemSubtype,
  189. [in] LPCWSTR szItemName,
  190. [in] DWORD cbData,
  191. [in][size_is(cbData)]
  192. BYTE *pbData,
  193. [in] PPST_PROMPTINFO pPromptInfo,
  194. [in] DWORD dwDefaultConfirmationStyle,
  195. [in] DWORD dwFlags
  196. );
  197. // OpenItem - opens an item for multiple accesses
  198. HRESULT OpenItem(
  199. [in] PST_KEY Key,
  200. [in] const GUID *pItemType,
  201. [in] const GUID *pItemSubtype,
  202. [in] LPCWSTR szItemName,
  203. [in] PST_ACCESSMODE ModeFlags,
  204. [in] PPST_PROMPTINFO pPromptInfo,
  205. [in] DWORD dwFlags
  206. );
  207. // CloseItem - closes an item
  208. HRESULT CloseItem(
  209. [in] PST_KEY Key,
  210. [in] const GUID *pItemType,
  211. [in] const GUID *pItemSubtype,
  212. [in] LPCWSTR szItemName,
  213. [in] DWORD dwFlags
  214. );
  215. // get the interface pointer of a subtype for enumeration of items
  216. HRESULT EnumItems(
  217. [in] PST_KEY Key,
  218. [in] const GUID *pItemType,
  219. [in] const GUID *pItemSubtype,
  220. [in] DWORD dwFlags,
  221. [in] IEnumPStoreItems **ppenum
  222. );
  223. };
  224. [
  225. object,
  226. uuid(5A6F1EBF-2DB1-11D0-8C39-00C04FD9126B),
  227. helpstring("IEnumPStoreProviders Interface"),
  228. pointer_default(unique)
  229. ]
  230. interface IEnumPStoreProviders : IUnknown
  231. {
  232. import "oaidl.idl";
  233. // gets the next provider
  234. HRESULT Next(
  235. [in] DWORD celt,
  236. [size_is(*pceltFetched)]
  237. [out] PST_PROVIDERINFO **rgelt,
  238. [in, out] DWORD *pceltFetched
  239. );
  240. // skips the requested provider
  241. HRESULT Skip(
  242. [in] DWORD celt
  243. );
  244. // resets the enumeration
  245. HRESULT Reset();
  246. // clones the interface
  247. HRESULT Clone(
  248. [out] IEnumPStoreProviders **ppenum
  249. );
  250. };
  251. [
  252. uuid(5A6F1EBD-2DB1-11D0-8C39-00C04FD9126B),
  253. version(1.0),
  254. helpstring("PStore 1.0 Type Library")
  255. ]
  256. library PSTORECLib
  257. {
  258. importlib("stdole2.tlb");
  259. [
  260. uuid(5A6F1EC3-2DB1-11D0-8C39-00C04FD9126B),
  261. helpstring("PStore Class")
  262. ]
  263. coclass CPStore
  264. {
  265. [default] interface IEnumPStoreProviders;
  266. interface IPStore;
  267. };
  268. [
  269. uuid(09BB61E7-31EC-11d0-8C39-00C04FD9126B),
  270. helpstring("CEnumTypes Class")
  271. ]
  272. coclass CEnumTypes
  273. {
  274. [default] interface IEnumPStoreTypes;
  275. };
  276. [
  277. uuid(09BB61E6-31EC-11d0-8C39-00C04FD9126B),
  278. helpstring("CEnumPStoreItems Class")
  279. ]
  280. coclass CEnumItems
  281. {
  282. [default] interface IEnumPStoreItems;
  283. };
  284. };
  285. // functions exported from the DLL
  286. // PStoreCreateInstance - gets interface to a specific storage provider
  287. HRESULT
  288. __stdcall
  289. PStoreCreateInstance(
  290. IPStore **ppProvider, // out
  291. PST_PROVIDERID *pProviderID, // in
  292. void *pReserved, // in
  293. DWORD dwFlags); // in
  294. // PStoreEnumProviders - returns an interface for enumerating providers
  295. HRESULT
  296. __stdcall
  297. PStoreEnumProviders(
  298. DWORD dwFlags, // in
  299. IEnumPStoreProviders **ppenum); // out