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.

291 lines
7.5 KiB

  1. // Provider interface header file
  2. //
  3. // all secure provider calls are prefixed by "SP"
  4. // providers must implement all of these interfaces!
  5. //
  6. #ifdef __cplusplus
  7. extern "C"{
  8. #endif
  9. // note: we typedef here because it is convenient and needed for
  10. // filling struct by GetProcAddress() later. After defining the types,
  11. // we simply instantiate the actual call as an implementation of that type.
  12. // load notification, register callbacks
  13. typedef
  14. HRESULT SPPROVIDERINITIALIZE(
  15. DISPIF_CALLBACKS *psCallbacks);
  16. SPPROVIDERINITIALIZE SPProviderInitialize;
  17. // Acquire Context notification
  18. typedef
  19. HRESULT SPACQUIRECONTEXT(
  20. PST_PROVIDER_HANDLE* phPSTProv,
  21. DWORD dwFlags);
  22. SPACQUIRECONTEXT SPAcquireContext;
  23. // Release Context notification
  24. typedef
  25. HRESULT SPRELEASECONTEXT(
  26. PST_PROVIDER_HANDLE* phPSTProv,
  27. DWORD dwFlags);
  28. SPRELEASECONTEXT SPReleaseContext;
  29. // GetProvInfo
  30. typedef
  31. HRESULT SPGETPROVINFO(
  32. /* [out] */ PPST_PROVIDERINFO __RPC_FAR *ppPSTInfo,
  33. /* [in] */ DWORD dwFlags);
  34. SPGETPROVINFO SPGetProvInfo;
  35. // GetProvParam
  36. typedef
  37. HRESULT SPGETPROVPARAM(
  38. /* [in] */ PST_PROVIDER_HANDLE* phPSTProv,
  39. /* [in] */ DWORD dwParam,
  40. /* [out] */ DWORD __RPC_FAR *pcbData,
  41. /* [size_is][size_is][out] */
  42. BYTE __RPC_FAR *__RPC_FAR *ppbData,
  43. /* [in] */ DWORD dwFlags);
  44. SPGETPROVPARAM SPGetProvParam;
  45. // SetProvParam
  46. typedef
  47. HRESULT SPSETPROVPARAM(
  48. /* [in] */ PST_PROVIDER_HANDLE* phPSTProv,
  49. /* [in] */ DWORD dwParam,
  50. /* [in] */ DWORD cbData,
  51. /* [in] */ BYTE* pbData,
  52. /* [in] */ DWORD dwFlags);
  53. SPSETPROVPARAM SPSetProvParam;
  54. // EnumTypes
  55. typedef
  56. HRESULT SPENUMTYPES(
  57. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  58. /* [in] */ PST_KEY Key,
  59. /* [out] */ GUID *pguidType,
  60. /* [in] */ DWORD dwIndex,
  61. /* [in] */ DWORD dwFlags);
  62. SPENUMTYPES SPEnumTypes;
  63. // GetTypeInfo
  64. typedef
  65. HRESULT SPGETTYPEINFO(
  66. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  67. /* [in] */ PST_KEY Key,
  68. /* [in] */ const GUID *pguidType,
  69. /* [in] */ PPST_TYPEINFO *ppinfoType,
  70. /* [in] */ DWORD dwFlags);
  71. SPGETTYPEINFO SPGetTypeInfo;
  72. // EnumSubtypes
  73. typedef
  74. HRESULT SPENUMSUBTYPES(
  75. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  76. /* [in] */ PST_KEY Key,
  77. /* [in] */ const GUID *pguidType,
  78. /* [out] */ GUID *pguidSubtype,
  79. /* [in] */ DWORD dwIndex,
  80. /* [in] */ DWORD dwFlags);
  81. SPENUMSUBTYPES SPEnumSubtypes;
  82. // GetSubtypeInfo
  83. typedef
  84. HRESULT SPGETSUBTYPEINFO(
  85. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  86. /* [in] */ PST_KEY Key,
  87. /* [in] */ const GUID *pguidType,
  88. /* [in] */ const GUID *pguidSubtype,
  89. /* [in] */ PPST_TYPEINFO *ppinfoSubtype,
  90. /* [in] */ DWORD dwFlags);
  91. SPGETSUBTYPEINFO SPGetSubtypeInfo;
  92. // EnumItems
  93. typedef
  94. HRESULT SPENUMITEMS(
  95. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  96. /* [in] */ PST_KEY Key,
  97. /* [in] */ const GUID *pguidType,
  98. /* [in] */ const GUID *pguidSubtype,
  99. /* [out] */ LPWSTR *ppszItemName,
  100. /* [in] */ DWORD dwIndex,
  101. /* [in] */ DWORD dwFlags);
  102. SPENUMITEMS SPEnumItems;
  103. // CreateType
  104. typedef
  105. HRESULT SPCREATETYPE(
  106. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  107. /* [in] */ PST_KEY Key,
  108. /* [in] */ const GUID *pguidType,
  109. /* [in] */ PPST_TYPEINFO pinfoType,
  110. /* [in] */ DWORD dwFlags);
  111. SPCREATETYPE SPCreateType;
  112. // DeleteType
  113. typedef
  114. HRESULT SPDELETETYPE(
  115. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  116. /* [in] */ PST_KEY Key,
  117. /* [in] */ const GUID __RPC_FAR *pguidType,
  118. /* [in] */ DWORD dwFlags);
  119. SPDELETETYPE SPDeleteType;
  120. // CreateSubtype
  121. typedef
  122. HRESULT SPCREATESUBTYPE(
  123. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  124. /* [in] */ PST_KEY Key,
  125. /* [in] */ const GUID *pguidType,
  126. /* [in] */ const GUID *pguidSubtype,
  127. /* [in] */ PPST_TYPEINFO pinfoSubtype,
  128. /* [in] */ PPST_ACCESSRULESET psRules,
  129. /* [in] */ DWORD dwFlags);
  130. SPCREATESUBTYPE SPCreateSubtype;
  131. // DeleteSubtype
  132. typedef
  133. HRESULT SPDELETESUBTYPE(
  134. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  135. /* [in] */ PST_KEY Key,
  136. /* [in] */ const GUID __RPC_FAR *pguidType,
  137. /* [in] */ const GUID __RPC_FAR *pguidSubtype,
  138. /* [in] */ DWORD dwFlags);
  139. SPDELETESUBTYPE SPDeleteSubtype;
  140. // WriteItem
  141. typedef
  142. HRESULT SPWRITEITEM(
  143. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  144. /* [in] */ PST_KEY Key,
  145. /* [in] */ const GUID *pguidType,
  146. /* [in] */ const GUID *pguidSubtype,
  147. /* [in] */ LPCWSTR szItemName,
  148. /* [in] */ DWORD cbData,
  149. /* [size_is][in] */ BYTE *pbData,
  150. /* [in] */ PPST_PROMPTINFO psPrompt,
  151. /* [in] */ DWORD dwDefaultConfirmationStyle,
  152. /* [in] */ DWORD dwFlags);
  153. SPWRITEITEM SPWriteItem;
  154. // ReadItem
  155. typedef
  156. HRESULT SPREADITEM(
  157. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  158. /* [in] */ PST_KEY Key,
  159. /* [in] */ const GUID *pguidType,
  160. /* [in] */ const GUID *pguidSubtype,
  161. /* [in] */ LPCWSTR szItemName,
  162. /* [out] */ DWORD *pcbData,
  163. /* [size_is][size_is][out] */ BYTE **ppbData,
  164. /* [in] */ PPST_PROMPTINFO psPrompt,
  165. /* [in] */ DWORD dwFlags);
  166. SPREADITEM SPReadItem;
  167. // OpenItem
  168. typedef
  169. HRESULT SPOPENITEM(
  170. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  171. /* [in] */ PST_KEY Key,
  172. /* [in] */ const GUID *pguidType,
  173. /* [in] */ const GUID *pguidSubtype,
  174. /* [in] */ LPCWSTR szItemName,
  175. /* [in] */ DWORD dwModeFlags,
  176. /* [in] */ PPST_PROMPTINFO psPrompt,
  177. /* [in] */ DWORD dwFlags);
  178. // CloseItem
  179. typedef
  180. HRESULT SPCLOSEITEM(
  181. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  182. /* [in] */ PST_KEY Key,
  183. /* [in] */ const GUID *pguidType,
  184. /* [in] */ const GUID *pguidSubtype,
  185. /* [in] */ LPCWSTR szItemName,
  186. /* [in] */ DWORD dwFlags);
  187. // DeleteItem
  188. typedef
  189. HRESULT SPDELETEITEM(
  190. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  191. /* [in] */ PST_KEY Key,
  192. /* [in] */ const GUID *pguidType,
  193. /* [in] */ const GUID *pguidSubtype,
  194. /* [in] */ LPCWSTR szItemName,
  195. /* [in] */ PPST_PROMPTINFO psPrompt,
  196. /* [in] */ DWORD dwFlags);
  197. SPDELETEITEM SPDeleteItem;
  198. // ReadAccessRuleset
  199. typedef
  200. HRESULT SPREADACCESSRULESET(
  201. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  202. /* [in] */ PST_KEY Key,
  203. /* [in] */ const GUID *pguidType,
  204. /* [in] */ const GUID *pguidSubtype,
  205. /* [out] */ PPST_ACCESSRULESET *ppsRules,
  206. /* [in] */ DWORD dwFlags);
  207. SPREADACCESSRULESET SPReadAccessRuleset;
  208. // WriteAccessRuleset
  209. typedef
  210. HRESULT SPWRITEACCESSRULESET(
  211. /* [in] */ PST_PROVIDER_HANDLE *phPSTProv,
  212. /* [in] */ PST_KEY Key,
  213. /* [in] */ const GUID *pguidType,
  214. /* [in] */ const GUID *pguidSubtype,
  215. /* [in] */ PPST_ACCESSRULESET psRules,
  216. /* [in] */ DWORD dwFlags);
  217. SPWRITEACCESSRULESET SPWriteAccessRuleset;
  218. ////////////////////////////////////////////////////
  219. // side door interfaces: dispatcher/provider only
  220. // PasswordChangeNotify
  221. typedef
  222. BOOL FPASSWORDCHANGENOTIFY(
  223. /* [in] */ LPWSTR szUser,
  224. /* [in] */ LPWSTR szPasswordName,
  225. /* [in] */ BYTE rgbOldPwd[],
  226. /* [in] */ DWORD cbOldPwd,
  227. /* [in] */ BYTE rgbNewPwd[],
  228. /* [in] */ DWORD cbNewPwd);
  229. FPASSWORDCHANGENOTIFY FPasswordChangeNotify;
  230. #ifdef __cplusplus
  231. } // extern C
  232. #endif