DSAdmin.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:8k
源码类别:

模拟服务器

开发平台:

C/C++

  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.   
  46. #undef  INTERFACE
  47. #define INTERFACE   IDsAdminCreateObj
  48. DECLARE_INTERFACE_(IDsAdminCreateObj, IUnknown)
  49. {
  50.   // *** IUnknown methods ***
  51.   STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  52.   STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
  53.   STDMETHOD_(ULONG,Release)(THIS) PURE;
  54.   // *** IDsAdminCreateObj methods ***
  55.   STDMETHOD(Initialize)(THIS_ /*IN*/ IADsContainer* pADsContainerObj, 
  56.                               /*IN*/ IADs* pADsCopySource,
  57.                               /*IN*/ LPCWSTR lpszClassName) PURE;
  58.   STDMETHOD(CreateModal)(THIS_ /*IN*/ HWND hwndParent, 
  59.                                /*OUT*/ IADs** ppADsObj) PURE;
  60. };
  61. //---------------------------------------------------------------------------
  62. //
  63. // Interface: IDsAdminNewObj
  64. // 
  65. // Implemented by: DS Admin
  66. //
  67. // Used by: creation extension in proc server (both primary and regular)
  68. //
  69. #undef  INTERFACE
  70. #define INTERFACE   IDsAdminNewObj
  71. DECLARE_INTERFACE_(IDsAdminNewObj, IUnknown)
  72. {
  73.   // *** IUnknown methods ***
  74.   STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  75.   STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
  76.   STDMETHOD_(ULONG,Release)(THIS) PURE;
  77.   // *** IDsAdminNewObj methods ***
  78.   STDMETHOD(SetButtons)(THIS_ /*IN*/ ULONG nCurrIndex, /*IN*/ BOOL bValid) PURE; 
  79.   STDMETHOD(GetPageCounts)(THIS_ /*OUT*/ LONG* pnTotal,
  80.                                  /*OUT*/ LONG* pnStartIndex) PURE; 
  81. };
  82. //---------------------------------------------------------------------------
  83. //
  84. // Interface: IDsAdminNewObjPrimarySite
  85. // 
  86. // Implemented by: DS Admin
  87. //
  88. // Used by: creation extension in proc server (primary only)
  89. //
  90. #undef  INTERFACE
  91. #define INTERFACE   IDsAdminNewObjPrimarySite
  92. DECLARE_INTERFACE_(IDsAdminNewObjPrimarySite, IUnknown)
  93. {
  94.   // *** IUnknown methods ***
  95.   STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  96.   STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
  97.   STDMETHOD_(ULONG,Release)(THIS) PURE;
  98.   // *** IDsAdminNewObjPrimarySite methods ***
  99.   STDMETHOD(CreateNew)(THIS_ /*IN*/ LPCWSTR pszName) PURE;
  100.   STDMETHOD(Commit)(THIS_ ) PURE;
  101. };
  102. //
  103. // struct passed to IDsAdminNewObjExt::Initialize()
  104. //
  105. // it contains information regarding UI look
  106. //
  107. typedef struct
  108. {
  109.     DWORD   dwSize;                     // size of struct, for versioning
  110.     HICON   hObjClassIcon;              // class icon for the object to be created
  111.     LPWSTR  lpszWizTitle;               // title of the wizard
  112.     LPWSTR  lpszContDisplayName;        // container display name (canonical name)
  113. } DSA_NEWOBJ_DISPINFO, * LPDSA_NEWOBJ_DISPINFO;
  114. //
  115. // context flags passed to IDsAdminNewObjExt::OnError() and to IDsAdminNewObjExt::WriteData()
  116. //
  117. #define DSA_NEWOBJ_CTX_PRECOMMIT      0x00000001  // before SetInfo()
  118. #define DSA_NEWOBJ_CTX_COMMIT         0x00000002  // SetInfo(), commit phase
  119. #define DSA_NEWOBJ_CTX_POSTCOMMIT     0x00000003  // after SetInfo()
  120. #define DSA_NEWOBJ_CTX_CLEANUP        0x00000004  // on post commit fail
  121. //---------------------------------------------------------------------------
  122. //
  123. // Interface: IDsAdminNewObjExt
  124. // 
  125. // Implemented by: creation extension in proc server (both primary and regular)
  126. //
  127. // Used by: DS Admin
  128. //
  129. #undef  INTERFACE
  130. #define INTERFACE   IDsAdminNewObjExt
  131. DECLARE_INTERFACE_(IDsAdminNewObjExt, IUnknown)
  132. {
  133.   // *** IUnknown methods ***
  134.   STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  135.   STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
  136.   STDMETHOD_(ULONG,Release)(THIS) PURE;
  137.   // *** IDsAdminNewObjExt methods ***
  138.   STDMETHOD(Initialize)(THIS_ /*IN*/ IADsContainer* pADsContainerObj, 
  139.                               /*IN*/ IADs* pADsCopySource,
  140.                               /*IN*/ LPCWSTR lpszClassName,
  141.                               /*IN*/ IDsAdminNewObj* pDsAdminNewObj,
  142.                               /*IN*/ LPDSA_NEWOBJ_DISPINFO pDispInfo) PURE;
  143.   STDMETHOD(AddPages)(THIS_ /*IN*/ LPFNADDPROPSHEETPAGE lpfnAddPage, 
  144.                             /*IN*/ LPARAM lParam) PURE;
  145.   STDMETHOD(SetObject)(THIS_ /*IN*/ IADs* pADsObj) PURE;
  146.   STDMETHOD(WriteData)(THIS_ /*IN*/ HWND hWnd, 
  147.                              /*IN*/ ULONG uContext) PURE;
  148.   
  149.   STDMETHOD(OnError)(THIS_ /*IN*/ HWND hWnd, 
  150.                            /*IN*/ HRESULT hr,
  151.                               /*IN*/ ULONG uContext) PURE;
  152.   
  153.   STDMETHOD(GetSummaryInfo)(THIS_ /*OUT*/BSTR* pBstrText) PURE;
  154. };
  155. //
  156. // Notification opcodes for IDsAdminNotifyHandler
  157. //
  158. #define DSA_NOTIFY_DEL      0x00000001  // delete
  159. #define DSA_NOTIFY_REN      0x00000002  // rename
  160. #define DSA_NOTIFY_MOV      0x00000004  // move
  161. #define DSA_NOTIFY_PROP     0x00000008  // property change
  162. #define DSA_NOTIFY_ALL      (DSA_NOTIFY_DEL|DSA_NOTIFY_REN|DSA_NOTIFY_MOV|DSA_NOTIFY_PROP)
  163. //
  164. // TODO: add explaination
  165. //
  166. // flags to handle additional data
  167. //
  168. #define DSA_NOTIFY_FLAG_ADDITIONAL_DATA        0x00000002   //process additional extension data?
  169. #define DSA_NOTIFY_FLAG_FORCE_ADDITIONAL_DATA  0x00000001   //operation forced
  170. //---------------------------------------------------------------------------
  171. //
  172. // Interface: IDsAdminNotifyHandler
  173. // 
  174. // Implemented by: notification handler in proc server
  175. //
  176. // Used by: DS Admin
  177. //
  178. #undef  INTERFACE
  179. #define INTERFACE   IDsAdminNotifyHandler
  180. DECLARE_INTERFACE_(IDsAdminNotifyHandler, IUnknown)
  181. {
  182.   // *** IUnknown methods ***
  183.   STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  184.   STDMETHOD_(ULONG,AddRef)(THIS)  PURE;
  185.   STDMETHOD_(ULONG,Release)(THIS) PURE;
  186.   // IDsAdminNotifyHandler methods
  187.   STDMETHOD(Initialize)(THIS_ /*IN*/ IDataObject* pExtraInfo, 
  188.                               /*OUT*/ ULONG* puEventFlags) PURE;
  189.   STDMETHOD(Begin)(THIS_ /*IN*/ ULONG uEvent,
  190.                          /*IN*/ IDataObject* pArg1,
  191.                          /*IN*/ IDataObject* pArg2,
  192.                          /*OUT*/ ULONG* puFlags,
  193.                          /*OUT*/ BSTR* pBstr) PURE;
  194.   STDMETHOD(Notify)(THIS_ /*IN*/ ULONG nItem, /*IN*/ ULONG uFlags) PURE; 
  195.   STDMETHOD(End)(THIS_) PURE; 
  196. };
  197. #endif // _DSADMIN_H