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.

272 lines
7.5 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1999.
  5. //
  6. // File: dsadmin.h
  7. //
  8. // Contents: DS Admin Object Creation public header
  9. //
  10. //---------------------------------------------------------------------------
  11. //
  12. // CoClass for the Object creation dialog object
  13. //
  14. // {E301A009-F901-11d2-82B9-00C04F68928B}
  15. DEFINE_GUID(CLSID_DsAdminCreateObj,
  16. 0xe301a009, 0xf901, 0x11d2, 0x82, 0xb9, 0x0, 0xc0, 0x4f, 0x68, 0x92, 0x8b);
  17. //
  18. // Interface GUIDs
  19. //
  20. // {53554A38-F902-11d2-82B9-00C04F68928B}
  21. DEFINE_GUID(IID_IDsAdminCreateObj,
  22. 0x53554a38, 0xf902, 0x11d2, 0x82, 0xb9, 0x0, 0xc0, 0x4f, 0x68, 0x92, 0x8b);
  23. // {F2573587-E6FC-11d2-82AF-00C04F68928B}
  24. DEFINE_GUID(IID_IDsAdminNewObj,
  25. 0xf2573587, 0xe6fc, 0x11d2, 0x82, 0xaf, 0x0, 0xc0, 0x4f, 0x68, 0x92, 0x8b);
  26. // {BE2B487E-F904-11d2-82B9-00C04F68928B}
  27. DEFINE_GUID(IID_IDsAdminNewObjPrimarySite,
  28. 0xbe2b487e, 0xf904, 0x11d2, 0x82, 0xb9, 0x0, 0xc0, 0x4f, 0x68, 0x92, 0x8b);
  29. // {6088EAE2-E7BF-11d2-82AF-00C04F68928B}
  30. DEFINE_GUID(IID_IDsAdminNewObjExt,
  31. 0x6088eae2, 0xe7bf, 0x11d2, 0x82, 0xaf, 0x0, 0xc0, 0x4f, 0x68, 0x92, 0x8b);
  32. // {E4A2B8B3-5A18-11d2-97C1-00A0C9A06D2D}
  33. DEFINE_GUID(IID_IDsAdminNotifyHandler,
  34. 0xe4a2b8b3, 0x5a18, 0x11d2, 0x97, 0xc1, 0x0, 0xa0, 0xc9, 0xa0, 0x6d, 0x2d);
  35. #ifndef _DSADMIN_H
  36. #define _DSADMIN_H
  37. // ----------------------------------------------------------------------------
  38. //
  39. // Interface: IDsAdminCreateObj
  40. //
  41. // Implemented by the object (implemented by the system) CLSID_DsAdminCreateObj
  42. //
  43. // Used by: any client needing to invoke the creation UI
  44. //
  45. #undef INTERFACE
  46. #define INTERFACE IDsAdminCreateObj
  47. DECLARE_INTERFACE_(IDsAdminCreateObj, IUnknown)
  48. {
  49. // *** IUnknown methods ***
  50. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  51. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  52. STDMETHOD_(ULONG,Release)(THIS) PURE;
  53. // *** IDsAdminCreateObj methods ***
  54. STDMETHOD(Initialize)(THIS_ /*IN*/ IADsContainer* pADsContainerObj,
  55. /*IN*/ IADs* pADsCopySource,
  56. /*IN*/ LPCWSTR lpszClassName) PURE;
  57. STDMETHOD(CreateModal)(THIS_ /*IN*/ HWND hwndParent,
  58. /*OUT*/ IADs** ppADsObj) PURE;
  59. };
  60. //---------------------------------------------------------------------------
  61. //
  62. // Interface: IDsAdminNewObj
  63. //
  64. // Implemented by: DS Admin
  65. //
  66. // Used by: creation extension in proc server (both primary and regular)
  67. //
  68. #undef INTERFACE
  69. #define INTERFACE IDsAdminNewObj
  70. DECLARE_INTERFACE_(IDsAdminNewObj, IUnknown)
  71. {
  72. // *** IUnknown methods ***
  73. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  74. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  75. STDMETHOD_(ULONG,Release)(THIS) PURE;
  76. // *** IDsAdminNewObj methods ***
  77. STDMETHOD(SetButtons)(THIS_ /*IN*/ ULONG nCurrIndex, /*IN*/ BOOL bValid) PURE;
  78. STDMETHOD(GetPageCounts)(THIS_ /*OUT*/ LONG* pnTotal,
  79. /*OUT*/ LONG* pnStartIndex) PURE;
  80. };
  81. //---------------------------------------------------------------------------
  82. //
  83. // Interface: IDsAdminNewObjPrimarySite
  84. //
  85. // Implemented by: DS Admin
  86. //
  87. // Used by: creation extension in proc server (primary only)
  88. //
  89. #undef INTERFACE
  90. #define INTERFACE IDsAdminNewObjPrimarySite
  91. DECLARE_INTERFACE_(IDsAdminNewObjPrimarySite, IUnknown)
  92. {
  93. // *** IUnknown methods ***
  94. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  95. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  96. STDMETHOD_(ULONG,Release)(THIS) PURE;
  97. // *** IDsAdminNewObjPrimarySite methods ***
  98. STDMETHOD(CreateNew)(THIS_ /*IN*/ LPCWSTR pszName) PURE;
  99. STDMETHOD(Commit)(THIS_ ) PURE;
  100. };
  101. //
  102. // struct passed to IDsAdminNewObjExt::Initialize()
  103. //
  104. // it contains information regarding UI look
  105. //
  106. typedef struct
  107. {
  108. DWORD dwSize; // size of struct, for versioning
  109. HICON hObjClassIcon; // class icon for the object to be created
  110. LPWSTR lpszWizTitle; // title of the wizard
  111. LPWSTR lpszContDisplayName; // container display name (canonical name)
  112. } DSA_NEWOBJ_DISPINFO, * LPDSA_NEWOBJ_DISPINFO;
  113. //
  114. // context flags passed to IDsAdminNewObjExt::OnError() and to IDsAdminNewObjExt::WriteData()
  115. //
  116. #define DSA_NEWOBJ_CTX_PRECOMMIT 0x00000001 // before SetInfo()
  117. #define DSA_NEWOBJ_CTX_COMMIT 0x00000002 // SetInfo(), commit phase
  118. #define DSA_NEWOBJ_CTX_POSTCOMMIT 0x00000003 // after SetInfo()
  119. #define DSA_NEWOBJ_CTX_CLEANUP 0x00000004 // on post commit fail
  120. //---------------------------------------------------------------------------
  121. //
  122. // Interface: IDsAdminNewObjExt
  123. //
  124. // Implemented by: creation extension in proc server (both primary and regular)
  125. //
  126. // Used by: DS Admin
  127. //
  128. #undef INTERFACE
  129. #define INTERFACE IDsAdminNewObjExt
  130. DECLARE_INTERFACE_(IDsAdminNewObjExt, IUnknown)
  131. {
  132. // *** IUnknown methods ***
  133. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  134. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  135. STDMETHOD_(ULONG,Release)(THIS) PURE;
  136. // *** IDsAdminNewObjExt methods ***
  137. STDMETHOD(Initialize)(THIS_ /*IN*/ IADsContainer* pADsContainerObj,
  138. /*IN*/ IADs* pADsCopySource,
  139. /*IN*/ LPCWSTR lpszClassName,
  140. /*IN*/ IDsAdminNewObj* pDsAdminNewObj,
  141. /*IN*/ LPDSA_NEWOBJ_DISPINFO pDispInfo) PURE;
  142. STDMETHOD(AddPages)(THIS_ /*IN*/ LPFNADDPROPSHEETPAGE lpfnAddPage,
  143. /*IN*/ LPARAM lParam) PURE;
  144. STDMETHOD(SetObject)(THIS_ /*IN*/ IADs* pADsObj) PURE;
  145. STDMETHOD(WriteData)(THIS_ /*IN*/ HWND hWnd,
  146. /*IN*/ ULONG uContext) PURE;
  147. STDMETHOD(OnError)(THIS_ /*IN*/ HWND hWnd,
  148. /*IN*/ HRESULT hr,
  149. /*IN*/ ULONG uContext) PURE;
  150. STDMETHOD(GetSummaryInfo)(THIS_ /*OUT*/BSTR* pBstrText) PURE;
  151. };
  152. //
  153. // Notification opcodes for IDsAdminNotifyHandler
  154. //
  155. #define DSA_NOTIFY_DEL 0x00000001 // delete
  156. #define DSA_NOTIFY_REN 0x00000002 // rename
  157. #define DSA_NOTIFY_MOV 0x00000004 // move
  158. #define DSA_NOTIFY_PROP 0x00000008 // property change
  159. #define DSA_NOTIFY_ALL (DSA_NOTIFY_DEL|DSA_NOTIFY_REN|DSA_NOTIFY_MOV|DSA_NOTIFY_PROP)
  160. //
  161. // TODO: add explaination
  162. //
  163. // flags to handle additional data
  164. //
  165. #define DSA_NOTIFY_FLAG_ADDITIONAL_DATA 0x00000002 //process additional extension data?
  166. #define DSA_NOTIFY_FLAG_FORCE_ADDITIONAL_DATA 0x00000001 //operation forced
  167. //---------------------------------------------------------------------------
  168. //
  169. // Interface: IDsAdminNotifyHandler
  170. //
  171. // Implemented by: notification handler in proc server
  172. //
  173. // Used by: DS Admin
  174. //
  175. #undef INTERFACE
  176. #define INTERFACE IDsAdminNotifyHandler
  177. DECLARE_INTERFACE_(IDsAdminNotifyHandler, IUnknown)
  178. {
  179. // *** IUnknown methods ***
  180. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  181. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  182. STDMETHOD_(ULONG,Release)(THIS) PURE;
  183. // IDsAdminNotifyHandler methods
  184. STDMETHOD(Initialize)(THIS_ /*IN*/ IDataObject* pExtraInfo,
  185. /*OUT*/ ULONG* puEventFlags) PURE;
  186. STDMETHOD(Begin)(THIS_ /*IN*/ ULONG uEvent,
  187. /*IN*/ IDataObject* pArg1,
  188. /*IN*/ IDataObject* pArg2,
  189. /*OUT*/ ULONG* puFlags,
  190. /*OUT*/ BSTR* pBstr) PURE;
  191. STDMETHOD(Notify)(THIS_ /*IN*/ ULONG nItem, /*IN*/ ULONG uFlags) PURE;
  192. STDMETHOD(End)(THIS_) PURE;
  193. };
  194. #endif // _DSADMIN_H