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

模拟服务器

开发平台:

C/C++

  1. //+---------------------------------------------------------------------------
  2. //
  3. //  Copyright (c) Microsoft Corporation. All rights reserved.
  4. //
  5. //  Contents:   Component Categories Interfaces
  6. //
  7. //----------------------------------------------------------------------------
  8. cpp_quote("//=--------------------------------------------------------------------------=")
  9. cpp_quote("// ComCat.h")
  10. cpp_quote("//=--------------------------------------------------------------------------=")
  11. cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
  12. cpp_quote("//")
  13. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF")
  14. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  15. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  16. cpp_quote("// PARTICULAR PURPOSE.")
  17. cpp_quote("//=--------------------------------------------------------------------------=")
  18. cpp_quote("")
  19. cpp_quote("#pragma comment(lib,"uuid.lib")")
  20. cpp_quote("")
  21. cpp_quote("//=--------------------------------------------------------------------------=")
  22. cpp_quote("// OLE Componet Categories Interfaces.")
  23. cpp_quote("//=--------------------------------------------------------------------------=")
  24. cpp_quote("//")
  25. #ifndef DO_NO_IMPORTS
  26. import "unknwn.idl";
  27. #endif
  28. interface IEnumGUID;
  29. interface IEnumCATEGORYINFO;
  30. interface ICatRegister;
  31. interface ICatInformation;
  32. cpp_quote("EXTERN_C const CLSID CLSID_StdComponentCategoriesMgr;")
  33. cpp_quote("")
  34. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  35. cpp_quote("//  Types")
  36.     typedef GUID CATID;
  37.     typedef REFGUID REFCATID;
  38. cpp_quote("#define IID_IEnumCLSID              IID_IEnumGUID")
  39. cpp_quote("#define IEnumCLSID                  IEnumGUID")
  40. cpp_quote("#define LPENUMCLSID                 LPENUMGUID")
  41. #define IEnumCLSID                      IEnumGUID
  42. cpp_quote("#define CATID_NULL                   GUID_NULL")
  43. cpp_quote("#define IsEqualCATID(rcatid1, rcatid2)       IsEqualGUID(rcatid1, rcatid2)")
  44. cpp_quote("#define IID_IEnumCATID       IID_IEnumGUID")
  45. cpp_quote("#define IEnumCATID           IEnumGUID")
  46. #define IEnumCATID                      IEnumGUID
  47. cpp_quote("")
  48. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  49. cpp_quote("//  Category IDs (link to uuid3.lib)")
  50. cpp_quote("EXTERN_C const CATID CATID_Insertable;")
  51. cpp_quote("EXTERN_C const CATID CATID_Control;")
  52. cpp_quote("EXTERN_C const CATID CATID_Programmable;")
  53. cpp_quote("EXTERN_C const CATID CATID_IsShortcut;")
  54. cpp_quote("EXTERN_C const CATID CATID_NeverShowExt;")
  55. cpp_quote("EXTERN_C const CATID CATID_DocObject;")
  56. cpp_quote("EXTERN_C const CATID CATID_Printable;")
  57. cpp_quote("EXTERN_C const CATID CATID_RequiresDataPathHost;")
  58. cpp_quote("EXTERN_C const CATID CATID_PersistsToMoniker;")
  59. cpp_quote("EXTERN_C const CATID CATID_PersistsToStorage;")
  60. cpp_quote("EXTERN_C const CATID CATID_PersistsToStreamInit;")
  61. cpp_quote("EXTERN_C const CATID CATID_PersistsToStream;")
  62. cpp_quote("EXTERN_C const CATID CATID_PersistsToMemory;")
  63. cpp_quote("EXTERN_C const CATID CATID_PersistsToFile;")
  64. cpp_quote("EXTERN_C const CATID CATID_PersistsToPropertyBag;")
  65. cpp_quote("EXTERN_C const CATID CATID_InternetAware;")
  66. cpp_quote("EXTERN_C const CATID CATID_DesignTimeUIActivatableControl;")
  67. cpp_quote("")
  68. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  69. cpp_quote("//  Interface Definitions")
  70. //+---------------------------------------------------------------------------
  71. //
  72. //  Copyright (c) Microsoft Corporation. All rights reserved.
  73. //
  74. //  Contents:    IEnumGUID interface definition
  75. //
  76. //----------------------------------------------------------------------------
  77. cpp_quote("#ifndef _LPENUMGUID_DEFINED")
  78. cpp_quote("#define _LPENUMGUID_DEFINED")
  79. [
  80.     object,
  81.     uuid(0002E000-0000-0000-C000-000000000046),
  82.     pointer_default(unique)
  83. ]
  84. interface IEnumGUID : IUnknown
  85. {
  86.     typedef [unique] IEnumGUID *LPENUMGUID;
  87.     HRESULT Next(
  88. [in] ULONG celt,
  89. [out, size_is(celt), length_is(*pceltFetched)] GUID *rgelt,
  90. [out] ULONG *pceltFetched);
  91.     HRESULT Skip(
  92. [in] ULONG celt);
  93.     HRESULT Reset();
  94.     HRESULT Clone(
  95. [out] IEnumGUID **ppenum);
  96. }
  97. cpp_quote("#endif")
  98. //+---------------------------------------------------------------------------
  99. //
  100. //  Copyright (c) Microsoft Corporation. All rights reserved.
  101. //
  102. //  Contents:    IEnumCATEGORYINFO definition
  103. //
  104. //----------------------------------------------------------------------------
  105. cpp_quote("#ifndef _LPENUMCATEGORYINFO_DEFINED")
  106. cpp_quote("#define _LPENUMCATEGORYINFO_DEFINED")
  107. [
  108.     object,
  109.     uuid(0002E011-0000-0000-C000-000000000046),
  110.     pointer_default(unique)
  111. ]
  112. interface IEnumCATEGORYINFO : IUnknown
  113. {
  114.     typedef [unique] IEnumCATEGORYINFO *LPENUMCATEGORYINFO;
  115. #define CATDESC_MAX 128
  116.     typedef struct tagCATEGORYINFO {
  117. CATID       catid;
  118. LCID        lcid;
  119.     OLECHAR szDescription[CATDESC_MAX];
  120.     } CATEGORYINFO, *LPCATEGORYINFO;
  121.     HRESULT Next(
  122. [in] ULONG celt,
  123. [out, size_is(celt), length_is(*pceltFetched)] CATEGORYINFO* rgelt,
  124. [out] ULONG* pceltFetched);
  125.     HRESULT Skip(
  126. [in] ULONG celt);
  127.     HRESULT Reset();
  128.     HRESULT Clone(
  129. [out] IEnumCATEGORYINFO** ppenum);
  130. }
  131. cpp_quote("#endif")
  132. //+---------------------------------------------------------------------------
  133. //
  134. //  Copyright (c) Microsoft Corporation. All rights reserved.
  135. //
  136. //  Contents:    ICatRegister definition
  137. //
  138. //----------------------------------------------------------------------------
  139. cpp_quote("#ifndef _LPCATREGISTER_DEFINED")
  140. cpp_quote("#define _LPCATREGISTER_DEFINED")
  141. [
  142.     object,
  143.     uuid(0002E012-0000-0000-C000-000000000046),
  144.     pointer_default(unique)
  145. ]
  146. interface ICatRegister : IUnknown
  147. {
  148.     typedef [unique] ICatRegister* LPCATREGISTER;
  149.     HRESULT RegisterCategories(
  150. [in] ULONG cCategories,
  151. [in, size_is(cCategories)] CATEGORYINFO rgCategoryInfo[]);
  152.     HRESULT UnRegisterCategories(
  153. [in] ULONG cCategories,
  154. [in, size_is(cCategories)] CATID rgcatid[]);
  155.     HRESULT RegisterClassImplCategories(
  156. [in] REFCLSID rclsid,
  157. [in] ULONG cCategories,
  158. [in, size_is(cCategories)] CATID rgcatid[]);
  159.     HRESULT UnRegisterClassImplCategories(
  160. [in] REFCLSID rclsid,
  161. [in] ULONG cCategories,
  162. [in, size_is(cCategories)] CATID rgcatid[]);
  163.     HRESULT RegisterClassReqCategories(
  164. [in] REFCLSID rclsid,
  165. [in] ULONG cCategories,
  166. [in, size_is(cCategories)] CATID rgcatid[]);
  167.     HRESULT UnRegisterClassReqCategories(
  168. [in] REFCLSID rclsid,
  169. [in] ULONG cCategories,
  170. [in, size_is(cCategories)] CATID rgcatid[]);
  171. }
  172. cpp_quote("#endif")
  173. //+---------------------------------------------------------------------------
  174. //
  175. //  Copyright (c) Microsoft Corporation. All rights reserved.
  176. //
  177. //  Contents:    ICatInformation definition
  178. //
  179. //----------------------------------------------------------------------------
  180. cpp_quote("#ifndef _LPCATINFORMATION_DEFINED")
  181. cpp_quote("#define _LPCATINFORMATION_DEFINED")
  182. [
  183.     object,
  184.     uuid(0002E013-0000-0000-C000-000000000046),
  185.     pointer_default(unique)
  186. ]
  187. interface ICatInformation : IUnknown
  188. {
  189.     typedef [unique] ICatInformation* LPCATINFORMATION;
  190.     HRESULT EnumCategories(
  191. [in] LCID lcid,
  192. [out] IEnumCATEGORYINFO** ppenumCategoryInfo);
  193.     HRESULT GetCategoryDesc(
  194. [in] REFCATID rcatid,
  195. [in] LCID lcid,
  196. [out] LPWSTR* pszDesc);
  197.     [local]
  198.     HRESULT EnumClassesOfCategories(
  199. [in] ULONG cImplemented,
  200. [in,size_is(cImplemented)] CATID rgcatidImpl[],
  201. [in] ULONG cRequired,
  202. [in,size_is(cRequired)] CATID rgcatidReq[],
  203. [out] IEnumCLSID** ppenumClsid);
  204.     [call_as(EnumClassesOfCategories)]
  205.     HRESULT RemoteEnumClassesOfCategories(
  206. [in] ULONG cImplemented,
  207. [in,unique,size_is(cImplemented)] CATID rgcatidImpl[],
  208. [in] ULONG cRequired,
  209. [in,unique,size_is(cRequired)] CATID rgcatidReq[],
  210. [out] IEnumCLSID** ppenumClsid);
  211.     [local]
  212.     HRESULT IsClassOfCategories(
  213. [in] REFCLSID rclsid,
  214. [in] ULONG cImplemented,
  215. [in,size_is(cImplemented)] CATID rgcatidImpl[],
  216. [in] ULONG cRequired,
  217. [in,size_is(cRequired)] CATID rgcatidReq[]);
  218.     [call_as(IsClassOfCategories)]
  219.     HRESULT RemoteIsClassOfCategories(
  220. [in] REFCLSID rclsid,
  221. [in] ULONG cImplemented,
  222. [in,unique,size_is(cImplemented)] CATID rgcatidImpl[],
  223. [in] ULONG cRequired,
  224. [in,unique,size_is(cRequired)] CATID rgcatidReq[] );
  225.     HRESULT EnumImplCategoriesOfClass(
  226. [in] REFCLSID rclsid,
  227. [out] IEnumCATID** ppenumCatid);
  228.     HRESULT EnumReqCategoriesOfClass(
  229. [in] REFCLSID rclsid,
  230. [out] IEnumCATID** ppenumCatid);
  231. }
  232. cpp_quote("#endif")