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.

414 lines
15 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. // File: objext.h
  7. //
  8. // Contents: header file for Object Extensions interfaces
  9. //
  10. //-------------------------------------------------------------------------
  11. #ifndef __OBJEXT_H
  12. #define __OBJEXT_H
  13. #ifndef BEGIN_INTERFACE
  14. #define BEGIN_INTERFACE
  15. #endif
  16. #include "Designer.H"
  17. ///////////////////////////////////////////////////////////////////////////
  18. //
  19. // forward declares
  20. //
  21. ///////////////////////////////////////////////////////////////////////////
  22. #define IClassDesigner IDocumentSite
  23. #define IID_IClassDesigner IID_IDocumentSite
  24. ///////////////////////////////////////////////////////////////////////////
  25. //
  26. // Object Extension Interfaces
  27. //
  28. ///////////////////////////////////////////////////////////////////////////
  29. //-------------------------------------------------------------------------
  30. // IServiceProvider Interface
  31. // This interface is implemented by an object that wish to provide "services"
  32. //
  33. //-------------------------------------------------------------------------
  34. #ifndef __IServiceProvider_INTERFACE_DEFINED
  35. #ifndef __IServiceProvider_INTERFACE_DEFINED__
  36. #define __IServiceProvider_INTERFACE_DEFINED
  37. #define __IServiceProvider_INTERFACE_DEFINED__
  38. // { 6d5140c1-7436-11ce-8034-00aa006009fa }
  39. DEFINE_GUID(IID_IServiceProvider, 0x6d5140c1, 0x7436, 0x11ce, 0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa);
  40. #undef INTERFACE
  41. #define INTERFACE IServiceProvider
  42. DECLARE_INTERFACE_(IServiceProvider, IUnknown)
  43. {
  44. BEGIN_INTERFACE
  45. // *** IUnknown methods ***
  46. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  47. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  48. STDMETHOD_(ULONG, Release)(THIS) PURE;
  49. // *** IServiceProvider methods ***
  50. STDMETHOD(QueryService)(THIS_
  51. /* [in] */ REFGUID rsid,
  52. /* [in] */ REFIID iid,
  53. /* [out] */ void ** ppvObj) PURE;
  54. };
  55. #endif // __IServiceProvider_INTERFACE_DEFINED__
  56. #endif // __IServiceProvider_INTERFACE_DEFINED
  57. //-------------------------------------------------------------------------
  58. // IDocumentSite Interface
  59. // This interface is implemented by a document object that can be customized
  60. //
  61. //-------------------------------------------------------------------------
  62. // { 94A0F6F1-10BC-11d0-8D09-00A0C90F2732 }
  63. DEFINE_GUID(IID_IDocumentSite, 0x94a0f6f1, 0x10bc, 0x11d0, 0x8d, 0x09, 0x00, 0xa0, 0xc9, 0x0f, 0x27, 0x32);
  64. typedef DWORD ACTFLAG;
  65. #define ACT_DEFAULT 0x00000000
  66. #define ACT_SHOW 0x00000001
  67. #undef INTERFACE
  68. #define INTERFACE IDocumentSite
  69. DECLARE_INTERFACE_(IDocumentSite, IUnknown)
  70. {
  71. BEGIN_INTERFACE
  72. // *** IUnknown methods ***
  73. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  74. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  75. STDMETHOD_(ULONG, Release)(THIS) PURE;
  76. // *** IDocumentSite methods ***
  77. STDMETHOD(SetSite)(THIS_
  78. /* [in] */ IServiceProvider * pSP) PURE;
  79. STDMETHOD(GetSite)(THIS_
  80. /* [out] */ IServiceProvider** ppSP) PURE;
  81. STDMETHOD(GetCompiler)(THIS_
  82. /* [in] */ REFIID iid,
  83. /* [out] */ void **ppvObj) PURE;
  84. STDMETHOD(ActivateObject)(THIS_ DWORD dwFlags) PURE;
  85. STDMETHOD(IsObjectShowable)(THIS) PURE;
  86. };
  87. ///////////////////////////////////////////////////////////////////////////
  88. //
  89. // Standard Services and Interfaces
  90. //
  91. ///////////////////////////////////////////////////////////////////////////
  92. //-------------------------------------------------------------------------
  93. // SLicensedClassManager
  94. // VBA provides this service to it's components and hosts to optimize
  95. // registry access and to insulate them from licensing concerns
  96. //
  97. // interfaces implemented:
  98. // ILicensedClassManager
  99. //-------------------------------------------------------------------------
  100. // { 6d5140d0-7436-11ce-8034-00aa006009fa }
  101. DEFINE_GUID(IID_IRequireClasses, 0x6d5140d0, 0x7436, 0x11ce, 0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa);
  102. #undef INTERFACE
  103. #define INTERFACE IRequireClasses
  104. DECLARE_INTERFACE_(IRequireClasses, IUnknown)
  105. {
  106. BEGIN_INTERFACE
  107. // *** IUnknown methods ***
  108. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  109. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  110. STDMETHOD_(ULONG, Release)(THIS) PURE;
  111. // *** IRequireClasses methods ***
  112. STDMETHOD(CountRequiredClasses)(THIS_
  113. /* [out] */ ULONG * pcClasses ) PURE;
  114. STDMETHOD(GetRequiredClasses)(THIS_
  115. /* [in] */ ULONG index,
  116. /* [out] */ CLSID * pclsid ) PURE;
  117. };
  118. // { 6d5140d4-7436-11ce-8034-00aa006009fa }
  119. DEFINE_GUID(IID_ILicensedClassManager, 0x6d5140d4, 0x7436, 0x11ce, 0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa);
  120. #define SID_SLicensedClassManager IID_ILicensedClassManager
  121. #undef INTERFACE
  122. #define INTERFACE ILicensedClassManager
  123. DECLARE_INTERFACE_(ILicensedClassManager, IUnknown)
  124. {
  125. BEGIN_INTERFACE
  126. // *** IUnknown methods ***
  127. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  128. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  129. STDMETHOD_(ULONG, Release)(THIS) PURE;
  130. // *** ILicensedClassManager methods ***
  131. STDMETHOD(OnChangeInRequiredClasses)(THIS_
  132. /* [in] */ IRequireClasses *pRequireClasses) PURE;
  133. };
  134. //-------------------------------------------------------------------------
  135. // SCreateExtendedTypeLib Service
  136. // This service is used by components to create a typelib
  137. // describing controls merged with their extender
  138. //
  139. // interfaces implemented:
  140. // ICreateExtendedTypeLib
  141. //-------------------------------------------------------------------------
  142. // { 6d5140d6-7436-11ce-8034-00aa006009fa }
  143. DEFINE_GUID(IID_IExtendedTypeLib, 0x6d5140d6, 0x7436, 0x11ce, 0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa);
  144. #define SID_SExtendedTypeLib IID_IExtendedTypeLib
  145. #undef INTERFACE
  146. #define INTERFACE IExtendedTypeLib
  147. DECLARE_INTERFACE_(IExtendedTypeLib, IUnknown)
  148. {
  149. BEGIN_INTERFACE
  150. // *** IUnknown methods ***
  151. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  152. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  153. STDMETHOD_(ULONG, Release)(THIS) PURE;
  154. // *** IExtendedTypeLib ***
  155. STDMETHOD(CreateExtendedTypeLib)(THIS_
  156. /* [in] */ LPCOLESTR lpstrCtrlLibFileName,
  157. /* [in] */ LPCOLESTR lpstrLibNamePrepend,
  158. /* [in] */ ITypeInfo *ptinfoExtender,
  159. /* [in] */ DWORD dwReserved,
  160. /* [in] */ DWORD dwFlags,
  161. /* [in] */ LPCOLESTR lpstrDirectoryName,
  162. /* [out] */ ITypeLib **pptlib) PURE;
  163. STDMETHOD(AddRefExtendedTypeLib)(THIS_
  164. /* [in] */ LPCOLESTR lpstrCtrlLibFileName,
  165. /* [in] */ LPCOLESTR lpstrLibNamePrepend,
  166. /* [in] */ ITypeInfo *ptinfoExtender,
  167. /* [in] */ DWORD dwReserved,
  168. /* [in] */ DWORD dwFlags,
  169. /* [in] */ LPCOLESTR lpstrDirectoryName,
  170. /* [out] */ ITypeLib **pptlib) PURE;
  171. STDMETHOD(AddRefExtendedTypeLibOfClsid)(THIS_
  172. /* [in] */ REFCLSID rclsidControl,
  173. /* [in] */ LPCOLESTR lpstrLibNamePrepend,
  174. /* [in] */ ITypeInfo *ptinfoExtender,
  175. /* [in] */ DWORD dwReserved,
  176. /* [in] */ DWORD dwFlags,
  177. /* [in] */ LPCOLESTR lpstrDirectoryName,
  178. /* [out] */ ITypeInfo **pptinfo) PURE;
  179. STDMETHOD(SetExtenderInfo)(THIS_
  180. /* [in] */ LPCOLESTR lpstrDirectoryName,
  181. /* [in] */ ITypeInfo *ptinfoExtender,
  182. /* [in] */ DWORD dwReserved) PURE;
  183. };
  184. //-------------------------------------------------------------------------
  185. // SLocalRegistry Service
  186. // VBA provides this service to it's components and hosts to optimize
  187. // registry access and to insulate them from licensing concerns
  188. //
  189. // interfaces implemented:
  190. // ILocalRegistry
  191. //-------------------------------------------------------------------------
  192. // { 6d5140d3-7436-11ce-8034-00aa006009fa }
  193. DEFINE_GUID(IID_ILocalRegistry, 0x6d5140d3, 0x7436, 0x11ce, 0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa);
  194. #define SID_SLocalRegistry IID_ILocalRegistry
  195. #undef INTERFACE
  196. #define INTERFACE ILocalRegistry
  197. DECLARE_INTERFACE_(ILocalRegistry, IUnknown)
  198. {
  199. BEGIN_INTERFACE
  200. // *** IUnknown methods ***
  201. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  202. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  203. STDMETHOD_(ULONG, Release)(THIS) PURE;
  204. // *** ILocalRegistry methods ***
  205. STDMETHOD(CreateInstance)(THIS_
  206. /* [in] */ CLSID clsid,
  207. /* [in] */ IUnknown * punkOuter,
  208. /* [in] */ REFIID riid,
  209. /* [in] */ DWORD dwFlags,
  210. /* [out] */ void ** ppvObj ) PURE;
  211. STDMETHOD(GetTypeLibOfClsid)(THIS_
  212. /* [in] */ CLSID clsid,
  213. /* [out] */ ITypeLib ** ptlib ) PURE;
  214. STDMETHOD(GetClassObjectOfClsid)(THIS_
  215. /* [in] */ REFCLSID clsid,
  216. /* [in] */ DWORD dwClsCtx,
  217. /* [in] */ LPVOID lpReserved,
  218. /* [in] */ REFIID riid,
  219. /* [out] */ void ** ppcClassObject ) PURE;
  220. };
  221. //-------------------------------------------------------------------------
  222. // IUIElement interface
  223. // components can implement services to allow external control of pieces
  224. // of their UI by implementing this interface
  225. //
  226. //-------------------------------------------------------------------------
  227. // { 759d0500-d979-11ce-84ec-00aa00614f3e }
  228. DEFINE_GUID(IID_IUIElement, 0x759d0500, 0xd979, 0x11ce, 0x84, 0xec, 0x00, 0xaa, 0x00, 0x61, 0x4f, 0x3e);
  229. #undef INTERFACE
  230. #define INTERFACE IUIElement
  231. DECLARE_INTERFACE_(IUIElement, IUnknown)
  232. {
  233. BEGIN_INTERFACE
  234. // *** IUnknown methods ****
  235. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  236. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  237. STDMETHOD_(ULONG, Release)(THIS) PURE;
  238. // *** IUIElement methods ****
  239. STDMETHOD(Show)(THIS) PURE;
  240. STDMETHOD(Hide)(THIS) PURE;
  241. STDMETHOD(IsVisible)(THIS) PURE;
  242. };
  243. //-------------------------------------------------------------------------
  244. // SProfferService Service
  245. // VBA provides this service to it's components and hosts to allow
  246. // them to dynamically provide services.
  247. //
  248. // interfaces implemented:
  249. // IProfferService
  250. //-------------------------------------------------------------------------
  251. // {CB728B20-F786-11ce-92AD-00AA00A74CD0}
  252. DEFINE_GUID(IID_IProfferService, 0xcb728b20, 0xf786, 0x11ce, 0x92, 0xad, 0x0, 0xaa, 0x0, 0xa7, 0x4c, 0xd0);
  253. #define SID_SProfferService IID_IProfferService
  254. #undef INTERFACE
  255. #define INTERFACE IProfferService
  256. DECLARE_INTERFACE_(IProfferService, IUnknown)
  257. {
  258. BEGIN_INTERFACE
  259. // *** IUnknown methods ***
  260. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  261. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  262. STDMETHOD_(ULONG, Release)(THIS) PURE;
  263. // *** IProfferService methods ***
  264. STDMETHOD(ProfferService)(THIS_
  265. /* [in] */ REFGUID rguidService,
  266. /* [in] */ IServiceProvider * psp,
  267. /* [out] */ DWORD *pdwCookie) PURE;
  268. STDMETHOD(RevokeService)(THIS_ /* [in] */ DWORD dwCookie) PURE;
  269. };
  270. // {4D07FC10-F931-11ce-B001-00AA006884E5}
  271. DEFINE_GUID(IID_ICategorizeProperties, 0x4d07fc10, 0xf931, 0x11ce, 0xb0, 0x1, 0x0, 0xaa, 0x0, 0x68, 0x84, 0xe5);
  272. // NOTE : CATID should no longer be used. Use PROPCAT instead.
  273. // UNDONE,erikc,1/22/96 : remove #ifdef when all components have updated to new typedef.
  274. #ifdef OBJEXT_OLD_CATID
  275. typedef int CATID;
  276. #else
  277. typedef int PROPCAT;
  278. #endif
  279. #undef INTERFACE
  280. #define INTERFACE ICategorizeProperties
  281. DECLARE_INTERFACE_(ICategorizeProperties, IUnknown)
  282. {
  283. BEGIN_INTERFACE
  284. // *** IUnknown methods ***
  285. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  286. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  287. STDMETHOD_(ULONG, Release)(THIS) PURE;
  288. // *** ICategorizeProperties ***
  289. STDMETHOD(MapPropertyToCategory)(THIS_
  290. /* [in] */ DISPID dispid,
  291. /* [out] */ PROPCAT* ppropcat) PURE;
  292. STDMETHOD(GetCategoryName)(THIS_
  293. /* [in] */ PROPCAT propcat,
  294. /* [in] */ LCID lcid,
  295. /* [out] */ BSTR* pbstrName) PURE;
  296. };
  297. typedef ICategorizeProperties FAR* LPCATEGORIZEPROPERTIES;
  298. // category ID: negative values are 'standard' categories, positive are control-specific
  299. // Note! This is a temporary list!
  300. #ifdef OBJEXT_OLD_CATID
  301. // NOTE : The following #defines should no longer be used. Use PROPCAT_ instead.
  302. // UNDONE,erikc,1/22/96 : remove #ifdef when all components have updated to new #defines.
  303. #define CI_Nil -1
  304. #define CI_Misc -2
  305. #define CI_Font -3
  306. #define CI_Position -4
  307. #define CI_Appearance -5
  308. #define CI_Behavior -6
  309. #define CI_Data -7
  310. #define CI_List -8
  311. #define CI_Text -9
  312. #define CI_Scale -10
  313. #define CI_DDE -11
  314. #else
  315. #define PROPCAT_Nil -1
  316. #define PROPCAT_Misc -2
  317. #define PROPCAT_Font -3
  318. #define PROPCAT_Position -4
  319. #define PROPCAT_Appearance -5
  320. #define PROPCAT_Behavior -6
  321. #define PROPCAT_Data -7
  322. #define PROPCAT_List -8
  323. #define PROPCAT_Text -9
  324. #define PROPCAT_Scale -10
  325. #define PROPCAT_DDE -11
  326. #endif
  327. //
  328. // Extra interfaces (chrisz)
  329. //
  330. //+-------------------------------------------------------------------------
  331. //
  332. // Help service. (robbear)
  333. //
  334. //--------------------------------------------------------------------------
  335. #define HELPINFO_WHATS_THIS_MODE_ON 1
  336. // { 6d5140c7-7436-11ce-8034-00aa006009fa }
  337. DEFINE_GUID(SID_SHelp, 0x6d5140c7, 0x7436, 0x11ce, 0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa);
  338. // { 6d5140c8-7436-11ce-8034-00aa006009fa }
  339. DEFINE_GUID(IID_IHelp, 0x6d5140c8, 0x7436, 0x11ce, 0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa);
  340. #undef INTERFACE
  341. #define INTERFACE IHelp
  342. DECLARE_INTERFACE_(IHelp, IUnknown)
  343. {
  344. BEGIN_INTERFACE
  345. // *** IUnknown methods ***
  346. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  347. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  348. STDMETHOD_(ULONG, Release)(THIS) PURE;
  349. // *** IHelp methods ***
  350. STDMETHOD(GetHelpFile) (THIS_ BSTR * pbstr) PURE;
  351. STDMETHOD(GetHelpInfo) (THIS_ DWORD * pdwHelpInfo) PURE;
  352. STDMETHOD(ShowHelp) (THIS_
  353. LPOLESTR szHelp,
  354. UINT fuCommand,
  355. DWORD dwHelpContext) PURE;
  356. };
  357. #endif // __OBJEXT_H