CorReg.h 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937
  1. //*****************************************************************************
  2. // File: CorReg.H
  3. //
  4. // Copyright (c) 1996-1998 Microsoft Corporation. All Rights Reserved.
  5. // Microsoft Confidential. Public header file for COM+ 1.0 release.
  6. //*****************************************************************************
  7. #ifndef _CORREG_H_
  8. #define _CORREG_H_
  9. #if _MSC_VER >= 1000
  10. #pragma once
  11. #endif // _MSC_VER >= 1000
  12. //*****************************************************************************
  13. // Required includes
  14. #include <ole2.h> // Definitions of OLE types.
  15. //*****************************************************************************
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. // Force 1 byte alignment for structures which must match.
  20. #include <pshpack1.h>
  21. #ifndef NODLLIMPORT
  22. #define DLLIMPORT __declspec(dllimport)
  23. #else
  24. #define DLLIMPORT
  25. #endif
  26. //*****************************************************************************
  27. //*****************************************************************************
  28. //
  29. // D L L P U B L I C E N T R Y P O I N T D E C L A R A T I O N S
  30. //
  31. //*****************************************************************************
  32. //*****************************************************************************
  33. #if !defined(_META_DATA_NO_SCOPE_) || defined(_META_DATA_SCOPE_WRAPPER_)
  34. //@todo: take out for RTM
  35. STDAPI CoGetCor(REFIID riid, void** ppv);
  36. #endif
  37. STDAPI CoInitializeCor(DWORD fFlags);
  38. STDAPI_(void) CoUninitializeCor(void);
  39. //*****************************************************************************
  40. //*****************************************************************************
  41. //
  42. // M E T A - D A T A D E C L A R A T I O N S
  43. //
  44. //*****************************************************************************
  45. //*****************************************************************************
  46. // Token definitions
  47. typedef INT_PTR mdScope; // scope token
  48. #define mdScopeNil ((mdScope)0)
  49. typedef INT_PTR mdToken; // Generic token
  50. typedef INT_PTR mdModule; // Module token (roughly, a scope)
  51. typedef INT_PTR mdTypeDef; // TypeDef in this scope
  52. typedef INT_PTR mdInterfaceImpl; // interface implementation token
  53. typedef INT_PTR mdTypeRef; // TypeRef reference (this or other scope)
  54. typedef INT_PTR mdNamespace; // namespace token
  55. typedef INT_PTR mdCustomValue; // attribute token
  56. typedef INT_PTR mdResource; // CompReg.Resource
  57. typedef INT_PTR mdCocatdef; // CompReg.Cocat
  58. typedef INT_PTR mdCocatImpl; // CompReg.CoclassCat
  59. typedef INT_PTR mdMimeTypeImpl; // CompReg.CoclassMIME
  60. typedef INT_PTR mdFormatImpl; // CompReg.CoclassFormats
  61. typedef INT_PTR mdProgID; // CompReg.RedirectProgID
  62. typedef INT_PTR mdRoleCheck; // CompReg.RoleCheck
  63. typedef unsigned long RID;
  64. enum CorRegTokenType
  65. {
  66. mdtTypeDef = 0x00000000,
  67. mdtInterfaceImpl = 0x01000000,
  68. mdtTypeRef = 0x03000000,
  69. mdtNamespace = 0x06000000,
  70. mdtCustomValue = 0x07000000,
  71. mdtResource = 0x0B000000,
  72. mdtCocatImpl = 0x0D000000,
  73. mdtMimeTypeImpl = 0x0E000000,
  74. mdtFormatImpl = 0x0F000000,
  75. mdtProgID = 0x10000000,
  76. mdtRoleCheck = 0x11000000,
  77. mdtModule = 0x14000000,
  78. };
  79. //
  80. // Build / decompose tokens.
  81. //
  82. #define RidToToken(rid,tktype) ((rid) |= (tktype))
  83. #define TokenFromRid(rid,tktype) ((rid) | (tktype))
  84. #define RidFromToken(tk) ((RID) ((tk) & 0x00ffffff))
  85. #define TypeFromToken(tk) ((tk) & 0xff000000)
  86. #define mdTokenNil ((mdToken)0)
  87. #define mdModuleNil ((mdModule)mdtModule)
  88. #define mdTypeDefNil ((mdTypeDef)mdtTypeDef)
  89. #define mdInterfaceImplNil ((mdInterfaceImpl)mdtInterfaceImpl)
  90. #define mdTypeRefNil ((mdTypeRef)mdtTypeRef)
  91. #define mdNamespaceNil ((mdNamespace)mdtNamespace)
  92. #define mdCustomValueNil ((mdCustomValue)mdtCustomValue)
  93. #define mdResourceNil ((mdResource)mdtResource)
  94. #define mdCocatImplNil ((mdCocatImpl)mdtCocatImpl)
  95. #define mdMimeTypeImplNil ((mdMimeTypeImpl)mdtMimeTypeImpl)
  96. #define mdFormatImplNil ((mdFormatImpl)mdtFormatImpl)
  97. #define mdProgIDNil ((mdProgID)mdtProgID)
  98. #define mdRoleCheckNil ((mdRoleCheck)mdtRoleCheck)
  99. enum CorRegTypeAttr // Used by emit_defineclass
  100. {
  101. tdPublic = 0x0001, // Class is public scope
  102. // Use this mask to retrieve class layout informaiton
  103. // 0 is AutoLayout, 0x2 is LayoutSequential, 4 is ExplicitLayout
  104. tdLayoutMask = 0x0006,
  105. tdAutoLayout = 0x0000, // Class fields are auto-laid out
  106. tdLayoutSequential = 0x0002, // Class fields are laid out sequentially
  107. tdExplicitLayout = 0x0004, // Layout is supplied explicitly
  108. tdWrapperClass = 0x0008, // This is a wrapper class
  109. tdFinal = 0x0010, // Class is final
  110. tdISSCompat = 0x0020, // InvokeSpecial backwards compatibility
  111. // Use tdStringFormatMask to retrieve string information
  112. tdStringFormatMask = 0x00c0,
  113. tdAnsiClass = 0x0000, // LPTSTR is interpreted as ANSI in this class
  114. tdUnicodeClass = 0x0040, // LPTSTR is interpreted as UNICODE
  115. tdAutoClass = 0x0080, // LPTSTR is interpreted automatically
  116. tdValueClass = 0x0100, // Class has value based semantics
  117. tdInterface = 0x0200, // Class is an interface
  118. tdAbstract = 0x0400, // Class is abstract
  119. tdImport = 0x1000, // Class / interface is imported
  120. tdRecord = 0x2000, // Class is a record (no methods or props)
  121. tdEnum = 0x4000, // Class is an enum; static final values only
  122. tdReserved1 = 0x0800, // reserve bit for internal use
  123. // tdReserved2 = 0x8000, // reserve bit for internal use
  124. };
  125. enum CorImplementType // Used internally for implements table
  126. {
  127. itImplements = 0x0000, // Interfaces implemented or parent ifaces
  128. itEvents = 0x0001, // Interfaces raised
  129. itRequires = 0x0002,
  130. itInherits = 0x0004,
  131. };
  132. //-------------------------------------
  133. //--- Registration support types
  134. //-------------------------------------
  135. enum CorClassActivateAttr
  136. {
  137. caaDeferCreate = 0x0001, // supports deferred create
  138. caaAppObject = 0x0002, // class is AppObject
  139. caaFixedIfaceSet = 0x0004, // interface set is open (use QI)
  140. caaIndependentlyCreateable = 0x0100,
  141. caaPredefined = 0x0200,
  142. // mask for caaLB*
  143. caaLoadBalancing = 0x0c00,
  144. caaLBNotSupported = 0x0400,
  145. caaLBSupported = 0x0800,
  146. caaLBNotSpecified = 0x0000,
  147. // mask for caaOP*
  148. caaObjectPooling = 0x3000,
  149. caaOPNotSupported = 0x1000,
  150. caaOPSupported = 0x2000,
  151. caaOPNotSpecified = 0x0000,
  152. // mask for caaJA*
  153. caaJITActivation = 0xc000,
  154. caaJANotSupported = 0x4000,
  155. caaJASupported = 0x8000,
  156. caaJANotSpecified = 0x0000,
  157. };
  158. enum CorIfaceSvcAttr
  159. {
  160. mlNone = 0x0001, // Not marshalled
  161. mlAutomation = 0x0002, // Standard marshalling
  162. mlProxyStub = 0x0004, // Custom marshalling
  163. // mask for mlDefer*
  164. mlDeferrable = 0x0018, // Methods on this interface are queuable
  165. mlDeferNotSupported = 0x0008,
  166. mlDeferSupported = 0x0010,
  167. mlDeferNotSpecified = 0x0000,
  168. };
  169. enum CocatImplAttr
  170. {
  171. catiaImplements = 0x0001, // coclass implements this category
  172. catiaRequires = 0x0002 // coclass requires this category
  173. };
  174. enum CorModuleExportAttr
  175. {
  176. moUsesGetLastError = 0x0001 // Module uses GetLastError
  177. };
  178. enum CorModuleRegAttr
  179. {
  180. rmaCustomReg = 0x0001
  181. };
  182. enum CorRegFormatAttr
  183. {
  184. rfaSupportsFormat = 0x0001,
  185. rfaConvertsFromFormat = 0x0002,
  186. rfaConvertsToFormat = 0x0003,
  187. rfaDefaultFormat = 0x0004,
  188. rfaIsFileExt = 0x0005,
  189. rfaIsFileType = 0x0006,
  190. rfaIsDataFormat = 0x0007
  191. };
  192. enum CorSynchAttr
  193. {
  194. sySupported = 0x0001,
  195. syRequired = 0x0002,
  196. syRequiresNew = 0x0004,
  197. syNotSupported = 0x0008,
  198. syThreadAffinity = 0x0010
  199. };
  200. enum CorThreadingAttr
  201. {
  202. taMain = 0x0001,
  203. taSTA = 0x0002,
  204. taMTA = 0x0004,
  205. taNeutral = 0x0008,
  206. taBoth = 0x0010
  207. };
  208. enum CorXactionAttr
  209. {
  210. xaSupported = 0x0001,
  211. xaRequired = 0x0002,
  212. xaRequiresNew = 0x0004,
  213. xaNotSupported = 0x0008,
  214. xaNoVote = 0x0010
  215. };
  216. enum CorRoleCheckAttr
  217. {
  218. rcChecksFor = 0x0001
  219. };
  220. //
  221. // Opaque type for an enumeration handle.
  222. //
  223. typedef void *HCORENUM;
  224. //
  225. // GetSaveSize accuracy
  226. //
  227. #ifndef _CORSAVESIZE_DEFINED_
  228. #define _CORSAVESIZE_DEFINED_
  229. enum CorSaveSize
  230. {
  231. cssAccurate = 0x0000, // Find exact save size, accurate but slower.
  232. cssQuick = 0x0001 // Estimate save size, may pad estimate, but faster.
  233. };
  234. #endif
  235. #define MAX_CLASS_NAME 255
  236. #define MAX_PACKAGE_NAME 255
  237. typedef unsigned __int64 CLASSVERSION;
  238. // %%Prototypes: -------------------------------------------------------------
  239. #ifndef DECLSPEC_SELECT_ANY
  240. #define DECLSPEC_SELECT_ANY __declspec(selectany)
  241. #endif // DECLSPEC_SELECT_ANY
  242. // CLSID_Cor: {bee00000-ee77-11d0-a015-00c04fbbb884}
  243. extern const GUID DECLSPEC_SELECT_ANY CLSID_Cor =
  244. { 0xbee00010, 0xee77, 0x11d0, {0xa0, 0x15, 0x00, 0xc0, 0x4f, 0xbb, 0xb8, 0x84 } };
  245. // CLSID_CorMetaDataDispenser: {E5CB7A31-7512-11d2-89CE-0080C792E5D8}
  246. // This is the "Master Dispenser", always guaranteed to be the most recent
  247. // dispenser on the machine.
  248. extern const GUID DECLSPEC_SELECT_ANY CLSID_CorMetaDataDispenser =
  249. { 0xe5cb7a31, 0x7512, 0x11d2, { 0x89, 0xce, 0x0, 0x80, 0xc7, 0x92, 0xe5, 0xd8 } };
  250. // CLSID_CorMetaDataDispenserReg: {435755FF-7397-11d2-9771-00A0C9B4D50C}
  251. // Dispenser coclass for version 1.0 meta data. To get the "latest" bind
  252. // to CLSID_CorMetaDataDispenser.
  253. extern const GUID DECLSPEC_SELECT_ANY CLSID_CorMetaDataDispenserReg =
  254. { 0x435755ff, 0x7397, 0x11d2, { 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc } };
  255. // CLSID_CorMetaDataReg: {87F3A1F5-7397-11d2-9771-00A0C9B4D50C}
  256. // For COM+ 1.0 Meta Data, Data Driven Registration
  257. extern const GUID DECLSPEC_SELECT_ANY CLSID_CorMetaDataReg =
  258. { 0x87f3a1f5, 0x7397, 0x11d2, { 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc } };
  259. // IID_IMetaDataInternal {02D601BB-C5B9-11d1-93F9-0000F8083460}
  260. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataInternal =
  261. { 0x2d601bb, 0xc5b9, 0x11d1, {0x93, 0xf9, 0x0, 0x0, 0xf8, 0x8, 0x34, 0x60 } };
  262. // {AD93D71D-E1F2-11d1-9409-0000F8083460}
  263. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataEmitTemp =
  264. { 0xad93d71d, 0xe1f2, 0x11d1, {0x94, 0x9, 0x0, 0x0, 0xf8, 0x8, 0x34, 0x60 } };
  265. interface IMetaDataRegEmit;
  266. interface IMetaDataRegImport;
  267. interface IMetaDataDispenser;
  268. // %%Interfaces: -------------------------------------------------------------
  269. //-------------------------------------
  270. //--- IMemory
  271. //-------------------------------------
  272. //---
  273. // IID_IMemory: {06A3EA8A-0225-11d1-BF72-00C04FC31E12}
  274. extern const GUID DECLSPEC_SELECT_ANY IID_IMemory =
  275. { 0x6a3ea8a, 0x225, 0x11d1, {0xbf, 0x72, 0x0, 0xc0, 0x4f, 0xc3, 0x1e, 0x12 } };
  276. //---
  277. #undef INTERFACE
  278. #define INTERFACE IMemory
  279. DECLARE_INTERFACE_(IMemory, IUnknown)
  280. {
  281. // *** IUnknown methods ***
  282. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  283. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  284. STDMETHOD_(ULONG,Release) (THIS) PURE;
  285. // *** IMemory methods ***
  286. STDMETHOD(GetMemory)(void **pMem, ULONG *iSize) PURE;
  287. STDMETHOD(SetMemory)(void *pMem, ULONG iSize) PURE;
  288. };
  289. //-------------------------------------
  290. //--- IMetaDataError
  291. //-------------------------------------
  292. //---
  293. // {B81FF171-20F3-11d2-8DCC-00A0C9B09C19}
  294. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataError =
  295. { 0xb81ff171, 0x20f3, 0x11d2, { 0x8d, 0xcc, 0x0, 0xa0, 0xc9, 0xb0, 0x9c, 0x19 } };
  296. //---
  297. #undef INTERFACE
  298. #define INTERFACE IMetaDataError
  299. DECLARE_INTERFACE_(IMetaDataError, IUnknown)
  300. {
  301. STDMETHOD(OnError)(HRESULT hrError, mdToken token) PURE;
  302. };
  303. //-------------------------------------
  304. //--- IMapToken
  305. //-------------------------------------
  306. //---
  307. // IID_IMapToken: {06A3EA8B-0225-11d1-BF72-00C04FC31E12}
  308. extern const GUID DECLSPEC_SELECT_ANY IID_IMapToken =
  309. { 0x6a3ea8b, 0x225, 0x11d1, {0xbf, 0x72, 0x0, 0xc0, 0x4f, 0xc3, 0x1e, 0x12 } };
  310. //---
  311. #undef INTERFACE
  312. #define INTERFACE IMapToken
  313. DECLARE_INTERFACE_(IMapToken, IUnknown)
  314. {
  315. STDMETHOD(Map)(ULONG tkImp, ULONG tkEmit) PURE;
  316. };
  317. //-------------------------------------
  318. //--- IMetaDataDispenser
  319. //-------------------------------------
  320. //---
  321. // {B81FF171-20F3-11d2-8DCC-00A0C9B09C19}
  322. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataDispenser =
  323. { 0x809c652e, 0x7396, 0x11d2, { 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc } };
  324. #undef INTERFACE
  325. #define INTERFACE IMetaDataDispenser
  326. DECLARE_INTERFACE_(IMetaDataDispenser, IUnknown)
  327. {
  328. STDMETHOD(DefineScope)( // Return code.
  329. REFCLSID rclsid, // [in] What version to create.
  330. DWORD dwCreateFlags, // [in] Flags on the create.
  331. REFIID riid, // [in] The interface desired.
  332. IUnknown **ppIUnk) PURE; // [out] Return interface on success.
  333. STDMETHOD(OpenScope)( // Return code.
  334. LPCWSTR szScope, // [in] The scope to open.
  335. DWORD dwOpenFlags, // [in] Open mode flags.
  336. REFIID riid, // [in] The interface desired.
  337. IUnknown **ppIUnk) PURE; // [out] Return interface on success.
  338. STDMETHOD(OpenScopeOnStream)( // Return code.
  339. IStream *pIStream, // [in] The scope to open.
  340. DWORD dwOpenFlags, // [in] Open mode flags.
  341. REFIID riid, // [in] The interface desired.
  342. IUnknown **ppIUnk) PURE; // [out] Return interface on success.
  343. STDMETHOD(OpenScopeOnMemory)( // Return code.
  344. LPCVOID pData, // [in] Location of scope data.
  345. ULONG cbData, // [in] Size of the data pointed to by pData.
  346. DWORD dwOpenFlags, // [in] Open mode flags.
  347. REFIID riid, // [in] The interface desired.
  348. IUnknown **ppIUnk) PURE; // [out] Return interface on success.
  349. };
  350. //-------------------------------------
  351. //--- IMetaDataRegEmit
  352. //-------------------------------------
  353. //---
  354. #if defined(_META_DATA_NO_SCOPE_) || defined(_META_DATA_SCOPE_WRAPPER_)
  355. // {601C95B9-7398-11d2-9771-00A0C9B4D50C}
  356. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataRegEmit =
  357. { 0x601c95b9, 0x7398, 0x11d2, { 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc } };
  358. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataRegEmitOld =
  359. { 0xf28f419b, 0x62ca, 0x11d2, { 0x8f, 0x2c, 0x0, 0xa0, 0xc9, 0xa6, 0x18, 0x6d } };
  360. //---
  361. #undef INTERFACE
  362. #define INTERFACE IMetaDataRegEmit
  363. DECLARE_INTERFACE_(IMetaDataRegEmit, IUnknown)
  364. {
  365. STDMETHOD(SetModuleProps)( // S_OK or error.
  366. LPCWSTR szName, // [IN] If not NULL, the name to set.
  367. const GUID *ppid, // [IN] If not NULL, the GUID to set.
  368. LCID lcid) PURE; // [IN] If not -1, the lcid to set.
  369. STDMETHOD(Save)( // S_OK or error.
  370. LPCWSTR szFile, // [IN] The filename to save to.
  371. DWORD dwSaveFlags) PURE; // [IN] Flags for the save.
  372. STDMETHOD(SaveToStream)( // S_OK or error.
  373. IStream *pIStream, // [IN] A writable stream to save to.
  374. DWORD dwSaveFlags) PURE; // [IN] Flags for the save.
  375. STDMETHOD(GetSaveSize)( // S_OK or error.
  376. CorSaveSize fSave, // [IN] cssAccurate or cssQuick.
  377. DWORD *pdwSaveSize) PURE; // [OUT] Put the size here.
  378. STDMETHOD(Merge)( // S_OK or error.
  379. IMetaDataRegImport *pImport, // [IN] The scope to be merged.
  380. IMapToken *pIMap) PURE; // [IN] An object to receive token remap notices.
  381. STDMETHOD(DefineCustomValueAsBlob)(
  382. mdToken tkObj,
  383. LPCWSTR szName,
  384. void const *pCustomValue,
  385. ULONG cbCustomValue,
  386. mdCustomValue *pcv) PURE;
  387. STDMETHOD(DefineTypeDef)( // S_OK or error.
  388. LPCWSTR szNamespace, // [IN] Namespace that the TypeDef is in. Must be 0 in '98
  389. LPCWSTR szTypeDef, // [IN] Name of TypeDef
  390. const GUID *pguid, // [IN] Optional clsid
  391. CLASSVERSION *pVer, // [IN] Optional version
  392. DWORD dwTypeDefFlags, // [IN] CustomValue flags
  393. mdToken tkExtends, // [IN] extends this TypeDef or typeref
  394. DWORD dwExtendsFlags, // [IN] Extends flags
  395. mdToken rtkImplements[], // [IN] Implements interfaces
  396. mdToken rtkEvents[], // [IN] Events interfaces
  397. mdTypeDef *ptd) PURE; // [OUT] Put TypeDef token here
  398. STDMETHOD(SetTypeDefProps)( // S_OK or error.
  399. mdTypeDef td, // [IN] The TypeDef.
  400. CLASSVERSION *pVer, // [IN] Optional version.
  401. DWORD dwTypeDefFlags, // [IN] TypeDef flags.
  402. mdToken tkExtends, // [IN] Base TypeDef or TypeRef.
  403. DWORD dwExtendsFlags, // [IN] Extends flags.
  404. mdToken rtkImplements[], // [IN] Implemented interfaces.
  405. mdToken rtkEvents[]) PURE; // [IN] Event interfaces.
  406. STDMETHOD(SetClassSvcsContext)(mdTypeDef td, DWORD dwClassActivateAttr, DWORD dwClassThreadAttr,
  407. DWORD dwXactionAttr, DWORD dwSynchAttr) PURE;
  408. STDMETHOD(DefineTypeRefByGUID)( // S_OK or error.
  409. GUID *pguid, // [IN] The Type's GUID.
  410. mdTypeRef *ptr) PURE; // [OUT] Put TypeRef token here.
  411. STDMETHOD(SetModuleReg)(DWORD dwModuleRegAttr, const GUID *pguid) PURE;
  412. STDMETHOD(SetClassReg)(mdTypeDef td, LPCWSTR szProgID,
  413. LPCWSTR szVIProgID, LPCWSTR szIconURL, ULONG ulIconResource, LPCWSTR szSmallIconURL,
  414. ULONG ulSmallIconResource, LPCWSTR szDefaultDispName) PURE;
  415. STDMETHOD(SetIfaceReg)(mdTypeDef td, DWORD dwIfaceSvcs, const GUID *proxyStub) PURE;
  416. STDMETHOD(SetCategoryImpl)(mdTypeDef td, GUID rGuidCoCatImpl[], GUID rGuidCoCatReqd[]) PURE;
  417. STDMETHOD(SetRedirectProgID)(mdTypeDef td, LPCWSTR rszRedirectProgID[]) PURE;
  418. STDMETHOD(SetMimeTypeImpl)(mdTypeDef td, LPCWSTR rszMimeType[]) PURE;
  419. STDMETHOD(SetFormatImpl)( // S_OK or error.
  420. mdTypeDef td, // [IN] The TypeDef.
  421. LPCWSTR rszFormatSupported[], // [IN] If not 0, array of supported formats. 0 for EOL.
  422. LPCWSTR rszFormatConvertsFrom[],// [IN] If not 0, array of ConvertsFrom values. "
  423. LPCWSTR rszFormatConvertsTo[], // [IN] If not 0, array of ConvertsTo values. "
  424. LPCWSTR rszFormatDefault[], // [IN] If not 0, array of Default format. Only one item.
  425. LPCWSTR rszFileExt[], // [IN] If not 0, array of file extensions. 0 for EOL.
  426. LPCWSTR rszFileType[]) PURE; // [IN] If not 0, array of file types. "
  427. STDMETHOD(SetRoleCheck)( // S_OK or error.
  428. mdToken tk, // [IN] Object to place role on.
  429. LPCWSTR rszName[], // [IN] Name for the role.
  430. DWORD rdwRoleFlags[]) PURE; // [IN] Flags for new role.
  431. STDMETHOD(SetHandler)( // S_OK.
  432. IUnknown *pUnk) PURE; // [IN] The new error handler.
  433. };
  434. #endif // #if defined(_META_DATA_NO_SCOPE_) || defined(_META_DATA_SCOPE_WRAPPER_)
  435. #if !defined(_META_DATA_NO_SCOPE_)
  436. //@TODO: $#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#
  437. // The following interface definition is being deprecated for COM+ 1.0
  438. // and beyond. Please convert to the new definition by defining _META_DATA_NO_SCOPE_
  439. // in your build.
  440. //@TODO: $#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#
  441. #if !defined(_META_DATA_SCOPE_WRAPPER_)
  442. // {F28F419B-62CA-11d2-8F2C-00A0C9A6186D}
  443. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataRegEmit =
  444. { 0xf28f419b, 0x62ca, 0x11d2, { 0x8f, 0x2c, 0x0, 0xa0, 0xc9, 0xa6, 0x18, 0x6d } };
  445. #endif
  446. #undef INTERFACE
  447. #if defined(_META_DATA_SCOPE_WRAPPER_)
  448. #define INTERFACE IMetaDataRegEmitOld
  449. #else
  450. #define INTERFACE IMetaDataRegEmit
  451. #endif
  452. DECLARE_INTERFACE_(INTERFACE, IUnknown)
  453. {
  454. STDMETHOD(DefineScope)( // S_OK or error.
  455. DWORD dwCreateFlags, // [IN] Flags on the create.
  456. mdScope *pscope) PURE; // [OUT] return scope here.
  457. STDMETHOD(SetModuleProps)( // S_OK or error.
  458. mdScope scope, // [IN] scope for which to set props.
  459. LPCWSTR szName, // [IN] If not NULL, the name to set.
  460. const GUID *ppid, // [IN] If not NULL, the GUID to set.
  461. LCID lcid) PURE; // [IN] If not -1, the lcid to set.
  462. STDMETHOD(Save)( // S_OK or error.
  463. mdScope es, // [IN] The scope to save.
  464. LPCWSTR szFile, // [IN] The filename to save to.
  465. DWORD dwSaveFlags) PURE; // [IN] Flags for the save.
  466. STDMETHOD(SaveToStream)( // S_OK or error.
  467. mdScope es, // [IN] The scope to save.
  468. IStream *pIStream, // [IN] A writable stream to save to.
  469. DWORD dwSaveFlags) PURE; // [IN] Flags for the save.
  470. STDMETHOD(GetSaveSize)( // S_OK or error.
  471. mdScope es, // [IN] The scope to query.
  472. CorSaveSize fSave, // [IN] cssAccurate or cssQuick.
  473. DWORD *pdwSaveSize) PURE; // [OUT] Put the size here.
  474. STDMETHOD_(void,Close)( // S_OK or error.
  475. mdScope scope) PURE; // [IN] The scope to close.
  476. STDMETHOD(Merge)( // S_OK or error.
  477. mdScope scEmit, // [IN] The scope to merge into.
  478. mdScope scImport, // [IN] The scope to be merged.
  479. IMapToken *pIMap) PURE; // [IN] An object to receive token remap notices.
  480. STDMETHOD(DefineCustomValueAsBlob)(mdScope es, mdToken tkObj, LPCWSTR szName,
  481. void const *pCustomValue, ULONG cbCustomValue, mdCustomValue *pcv) PURE;
  482. STDMETHOD(DefineTypeDef)( // S_OK or error.
  483. mdScope es, // [IN] Emit scope
  484. LPCWSTR szNamespace, // [IN] Namespace that the TypeDef is in. Must be 0 in '98
  485. LPCWSTR szTypeDef, // [IN] Name of TypeDef
  486. const GUID *pguid, // [IN] Optional clsid
  487. CLASSVERSION *pVer, // [IN] Optional version
  488. DWORD dwTypeDefFlags, // [IN] CustomValue flags
  489. mdToken tkExtends, // [IN] extends this TypeDef or typeref
  490. DWORD dwExtendsFlags, // [IN] Extends flags
  491. mdToken rtkImplements[], // [IN] Implements interfaces
  492. mdToken rtkEvents[], // [IN] Events interfaces
  493. mdTypeDef *ptd) PURE; // [OUT] Put TypeDef token here
  494. STDMETHOD(SetTypeDefProps)( // S_OK or error.
  495. mdScope es, // [IN] The emit scope.
  496. mdTypeDef td, // [IN] The TypeDef.
  497. CLASSVERSION *pVer, // [IN] Optional version.
  498. DWORD dwTypeDefFlags, // [IN] TypeDef flags.
  499. mdToken tkExtends, // [IN] Base TypeDef or TypeRef.
  500. DWORD dwExtendsFlags, // [IN] Extends flags.
  501. mdToken rtkImplements[], // [IN] Implemented interfaces.
  502. mdToken rtkEvents[]) PURE; // [IN] Event interfaces.
  503. STDMETHOD(SetClassSvcsContext)(mdScope es, mdTypeDef td, DWORD dwClassActivateAttr, DWORD dwClassThreadAttr,
  504. DWORD dwXactionAttr, DWORD dwSynchAttr) PURE;
  505. STDMETHOD(DefineTypeRefByGUID)( // S_OK or error.
  506. mdScope sc, // [IN] The emit scope.
  507. GUID *pguid, // [IN] The Type's GUID.
  508. mdTypeRef *ptr) PURE; // [OUT] Put TypeRef token here.
  509. STDMETHOD(SetModuleReg)(mdScope es, DWORD dwModuleRegAttr, const GUID *pguid) PURE;
  510. STDMETHOD(SetClassReg)(mdScope es, mdTypeDef td, LPCWSTR szProgID,
  511. LPCWSTR szVIProgID, LPCWSTR szIconURL, ULONG ulIconResource, LPCWSTR szSmallIconURL,
  512. ULONG ulSmallIconResource, LPCWSTR szDefaultDispName) PURE;
  513. STDMETHOD(SetIfaceReg)(mdScope es, mdTypeDef td, DWORD dwIfaceSvcs, const GUID *proxyStub) PURE;
  514. STDMETHOD(SetCategoryImpl)(mdScope es, mdTypeDef td, GUID rGuidCoCatImpl[], GUID rGuidCoCatReqd[]) PURE;
  515. STDMETHOD(SetRedirectProgID)(mdScope es, mdTypeDef td, LPCWSTR rszRedirectProgID[]) PURE;
  516. STDMETHOD(SetMimeTypeImpl)(mdScope es, mdTypeDef td, LPCWSTR rszMimeType[]) PURE;
  517. STDMETHOD(SetFormatImpl)( // S_OK or error.
  518. mdScope es, // [IN] The emit scope.
  519. mdTypeDef td, // [IN] The TypeDef.
  520. LPCWSTR rszFormatSupported[], // [IN] If not 0, array of supported formats. 0 for EOL.
  521. LPCWSTR rszFormatConvertsFrom[],// [IN] If not 0, array of ConvertsFrom values. "
  522. LPCWSTR rszFormatConvertsTo[], // [IN] If not 0, array of ConvertsTo values. "
  523. LPCWSTR rszFormatDefault[], // [IN] If not 0, array of Default format. Only one item.
  524. LPCWSTR rszFileExt[], // [IN] If not 0, array of file extensions. 0 for EOL.
  525. LPCWSTR rszFileType[]) PURE; // [IN] If not 0, array of file types. "
  526. STDMETHOD(SetRoleCheck)( // S_OK or error.
  527. mdScope es, // [IN] Emit scope.
  528. mdToken tk, // [IN] Object to place role on.
  529. LPCWSTR rszName[], // [IN] Name for the role.
  530. DWORD rdwRoleFlags[]) PURE; // [IN] Flags for new role.
  531. STDMETHOD(SetHandler)( // S_OK.
  532. mdScope sc, // [IN] The scope.
  533. IUnknown *pUnk) PURE; // [IN] The new error handler.
  534. };
  535. #endif // !defined(_META_DATA_NO_SCOPE_)
  536. //-------------------------------------
  537. //--- IMetaDataRegImport
  538. //-------------------------------------
  539. #if defined(_META_DATA_NO_SCOPE_) || defined(_META_DATA_SCOPE_WRAPPER_)
  540. // {4398B4FD-7399-11d2-9771-00A0C9B4D50C}
  541. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataRegImport =
  542. { 0x4398b4fd, 0x7399, 0x11d2, { 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc } };
  543. // {F28F419A-62CA-11d2-8F2C-00A0C9A6186D}
  544. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataRegImportOld =
  545. { 0xf28f419a, 0x62ca, 0x11d2, { 0x8f, 0x2c, 0x0, 0xa0, 0xc9, 0xa6, 0x18, 0x6d } };
  546. #undef INTERFACE
  547. #define INTERFACE IMetaDataRegImport
  548. DECLARE_INTERFACE_(IMetaDataRegImport, IUnknown)
  549. {
  550. STDMETHOD_(void, CloseEnum)(HCORENUM hEnum) PURE;
  551. STDMETHOD(CountEnum)(HCORENUM hEnum, ULONG *pulCount) PURE;
  552. STDMETHOD(ResetEnum)(HCORENUM hEnum, ULONG ulPos) PURE;
  553. STDMETHOD(EnumTypeDefs)(HCORENUM *phEnum, mdTypeDef rTypeDefs[],
  554. ULONG cMax, ULONG *pcTypeDefs) PURE;
  555. STDMETHOD(EnumInterfaceImpls)(HCORENUM *phEnum, mdTypeDef td,
  556. mdInterfaceImpl rImpls[], ULONG cMax,
  557. ULONG* pcImpls) PURE;
  558. STDMETHOD(EnumTypeRefs)(HCORENUM *phEnum, mdTypeRef rTypeRefs[],
  559. ULONG cMax, ULONG* pcTypeRefs) PURE;
  560. STDMETHOD(EnumCustomValues)(HCORENUM *phEnum, mdToken tk,
  561. mdCustomValue rCustomValues[], ULONG cMax,
  562. ULONG* pcCustomValues) PURE;
  563. STDMETHOD(EnumResources)(HCORENUM *phEnum, mdResource rResources[],
  564. ULONG cMax, ULONG* pcResources) PURE;
  565. STDMETHOD(EnumCategoryImpls)(HCORENUM *phEnum, mdTypeDef td, mdCocatImpl rCocatImpls[],
  566. ULONG cMax, ULONG* pcCocatImpls) PURE;
  567. STDMETHOD(EnumRedirectProgIDs)(HCORENUM *phEnum, mdTypeDef td, mdProgID rRedirectProgIDs[],
  568. ULONG cMax, ULONG* pcRedirectProgIDs) PURE;
  569. STDMETHOD(EnumMimeTypeImpls)(HCORENUM *phEnum, mdTypeDef td, mdMimeTypeImpl rMimeTypeImpls[],
  570. ULONG cMax, ULONG* pcMimeTypeImpls) PURE;
  571. STDMETHOD(EnumFormatImpls)(HCORENUM *phEnum, mdTypeDef td, mdFormatImpl rFormatImpls[],
  572. ULONG cMax, ULONG* pcFormatImpls) PURE;
  573. STDMETHOD(EnumRoleChecks)( // S_OK or error.
  574. HCORENUM *phEnum, // [OUT] Return enumerator.
  575. mdToken tk, // [IN] Object to enumerate roles for.
  576. mdRoleCheck rRoleChecks[], // [OUT] Place cMax tokens here.
  577. ULONG cMax, // [IN] Max size of rRoleChecks.
  578. ULONG *pcRoleChecks) PURE; // [Out] Place count of returned role checks here.
  579. STDMETHOD(FindTypeDefByName)( // S_OK or error.
  580. LPCWSTR szNamespace, // [IN] Namespace with the Type.
  581. LPCWSTR szTypeDef, // [IN] Name of the Type.
  582. mdTypeDef *ptd) PURE; // [OUT] Put the TypeDef token here.
  583. STDMETHOD(FindTypeDefByGUID)( // S_OK or error.
  584. const GUID *pguid, // [IN] The GUID of the Type.
  585. mdTypeDef *ptd) PURE; // [OUT] Put the TypeDef token here.
  586. STDMETHOD(FindCustomValue)(mdToken tk, LPCWSTR szName, mdCustomValue *pcv,
  587. DWORD *pdwValueType) PURE;
  588. STDMETHOD(GetScopeProps)(LPWSTR szName, ULONG cchName, ULONG *pchName,
  589. GUID *ppid, GUID *pmvid, LCID *pLcid) PURE;
  590. STDMETHOD(GetModuleFromScope)( // S_OK.
  591. mdModule *pmd) PURE; // [OUT] Put mdModule token here.
  592. STDMETHOD(GetTypeDefProps)( // S_OK or error.
  593. mdTypeDef td, // [IN] TypeDef token for inquiry.
  594. LPWSTR szNamespace, // [OUT] Put Namespace here.
  595. ULONG cchNamespace, // [IN] size of Namespace buffer in wide chars.
  596. ULONG *pchNamespace, // [OUT] put size of Namespace (wide chars) here.
  597. LPWSTR szTypeDef, // [OUT] Put name here.
  598. ULONG cchTypeDef, // [IN] size of name buffer in wide chars.
  599. ULONG *pchTypeDef, // [OUT] put size of name (wide chars) here.
  600. GUID *pguid, // [OUT] Put clsid here.
  601. CLASSVERSION *pver, // [OUT] Put version here.
  602. DWORD *pdwTypeDefFlags, // [OUT] Put flags here.
  603. mdToken *ptkExtends, // [OUT] Put base class TypeDef/TypeRef here.
  604. DWORD *pdwExtendsFlags) PURE; // [OUT] Put extends flags here.
  605. STDMETHOD(GetClassSvcsContext)(mdTypeDef td, DWORD *pdwClassActivateAttr, DWORD *pdwThreadAttr,
  606. DWORD *pdwXactonAttr, DWORD *pdwSynchAttr) PURE;
  607. STDMETHOD(GetInterfaceImplProps)( // S_OK or error.
  608. mdInterfaceImpl iiImpl, // [IN] InterfaceImpl token.
  609. mdTypeDef *pClass, // [OUT] Put implementing class token here.
  610. mdToken *ptkIface, // [OUT] Put implemented interface token here.
  611. DWORD *pdwFlags) PURE; // [OUT] Put implementation flags here.
  612. STDMETHOD(GetCustomValueProps)(mdCustomValue cv, LPWSTR szName, ULONG cchName,
  613. ULONG *pchName, DWORD *pdwValueType) PURE;
  614. STDMETHOD(GetCustomValueAsBlob)(mdCustomValue cv, void const **ppBlob, ULONG *pcbSize) PURE;
  615. STDMETHOD(GetTypeRefProps)(mdTypeRef tr, LPWSTR szTypeRef,
  616. ULONG cchTypeRef, ULONG *pchTypeRef, GUID *pGuid, DWORD *pdwBind) PURE;
  617. STDMETHOD(GetModuleRegProps)(DWORD *pModuleRegAttr, GUID *pguid) PURE;
  618. STDMETHOD(GetClassRegProps)(mdTypeDef td,
  619. LPWSTR szProgid, ULONG cchProgid, ULONG *pchProgid,
  620. LPWSTR szVIProgid, ULONG cchVIProgid, ULONG *pchVIProgid,
  621. LPWSTR szIconURL, ULONG cchIconURL, ULONG *pchIconURL, ULONG *pIconResource,
  622. LPWSTR szSmallIconURL, ULONG cchSmallIconURL, ULONG *pchSmallIconURL, ULONG *pSmallIconResource,
  623. LPWSTR szDefaultDispname, ULONG cchDefaultDispname, ULONG *pchDefaultDispname) PURE;
  624. STDMETHOD(GetIfaceRegProps)(mdTypeDef td, DWORD *pdwIfaceSvcs, GUID *pProxyStub) PURE;
  625. STDMETHOD(GetResourceProps)(mdResource rs, LPWSTR szURL, ULONG cchURL, ULONG *pchURL) PURE;
  626. STDMETHOD(GetCategoryImplProps)(mdCocatImpl cocat, GUID *pguid, DWORD *pdwCocatImplAttr) PURE;
  627. STDMETHOD(GetRedirectProgIDProps)(mdProgID progid,
  628. LPWSTR szProgID, ULONG cchProgID, ULONG *pchProgID) PURE;
  629. STDMETHOD(GetMimeTypeImplProps)(mdMimeTypeImpl mime,
  630. LPWSTR szMime, ULONG cchMime, ULONG *pchMime) PURE;
  631. STDMETHOD(GetFormatImplProps)( mdFormatImpl format,
  632. LPWSTR szFormat, ULONG cchFormat, ULONG *pchFormat,
  633. DWORD *pdwRegFormatAttr) PURE;
  634. STDMETHOD(GetRoleCheckProps)( // S_OK or error.
  635. mdRoleCheck rc, // [IN] The role check to get props for.
  636. LPWSTR szName, // [OUT] Buffer for name.
  637. ULONG cchName, // [IN] Max characters for szName.
  638. ULONG *pchName, // [OUT] Available string chars for szName.
  639. DWORD *pdwRoleFlags) PURE; // [OUT] Role flags go here.
  640. STDMETHOD(ResolveTypeRef)(mdTypeRef tr, REFIID riid, IUnknown **ppIScope, mdTypeDef *ptd) PURE;
  641. };
  642. #endif // defined(_META_DATA_NO_SCOPE_) || defined(_META_DATA_SCOPE_WRAPPER_)
  643. #if !defined(_META_DATA_NO_SCOPE_)
  644. //@TODO: $#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#
  645. // The following interface definition is being deprecated for COM+ 1.0
  646. // and beyond. It still exists to make porting to the new api easier. If
  647. // you need to, define _META_DATA_NO_SCOPE_ to get the old behavior.
  648. //@TODO: $#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#
  649. #if !defined(_META_DATA_SCOPE_WRAPPER_)
  650. // {F28F419A-62CA-11d2-8F2C-00A0C9A6186D}
  651. extern const GUID DECLSPEC_SELECT_ANY IID_IMetaDataRegImport =
  652. { 0xf28f419a, 0x62ca, 0x11d2, { 0x8f, 0x2c, 0x0, 0xa0, 0xc9, 0xa6, 0x18, 0x6d } };
  653. #endif
  654. #undef INTERFACE
  655. #if defined(_META_DATA_SCOPE_WRAPPER_)
  656. #define INTERFACE IMetaDataRegImportOld
  657. #else
  658. #define INTERFACE IMetaDataRegImport
  659. #endif
  660. DECLARE_INTERFACE_(INTERFACE, IUnknown)
  661. {
  662. STDMETHOD(OpenScope)(LPCWSTR szScope, DWORD dwOpenFlags, mdScope *pscope) PURE;
  663. STDMETHOD(OpenScopeOnStream)(IStream *pIStream, DWORD dwOpenFlags, mdScope *psc) PURE;
  664. STDMETHOD(OpenScopeOnMemory)(LPCVOID pData, ULONG cbData, mdScope *psc) PURE;
  665. STDMETHOD_(void,Close)(mdScope scope) PURE;
  666. STDMETHOD_(void, CloseEnum)(mdScope scope, HCORENUM hEnum) PURE;
  667. STDMETHOD(CountEnum)(mdScope scope, HCORENUM hEnum, ULONG *pulCount) PURE;
  668. STDMETHOD(ResetEnum)(mdScope scope, HCORENUM hEnum, ULONG ulPos) PURE;
  669. STDMETHOD(EnumTypeDefs)(mdScope scope, HCORENUM *phEnum, mdTypeDef rTypeDefs[],
  670. ULONG cMax, ULONG *pcTypeDefs) PURE;
  671. STDMETHOD(EnumInterfaceImpls)(mdScope scope, HCORENUM *phEnum, mdTypeDef td,
  672. mdInterfaceImpl rImpls[], ULONG cMax,
  673. ULONG* pcImpls) PURE;
  674. STDMETHOD(EnumTypeRefs)(mdScope scope, HCORENUM *phEnum, mdTypeRef rTypeRefs[],
  675. ULONG cMax, ULONG* pcTypeRefs) PURE;
  676. STDMETHOD(EnumCustomValues)(mdScope scope, HCORENUM *phEnum, mdToken tk,
  677. mdCustomValue rCustomValues[], ULONG cMax,
  678. ULONG* pcCustomValues) PURE;
  679. STDMETHOD(EnumResources)(mdScope scope, HCORENUM *phEnum, mdResource rResources[],
  680. ULONG cMax, ULONG* pcResources) PURE;
  681. STDMETHOD(EnumCategoryImpls)(mdScope scope, HCORENUM *phEnum, mdTypeDef td, mdCocatImpl rCocatImpls[],
  682. ULONG cMax, ULONG* pcCocatImpls) PURE;
  683. STDMETHOD(EnumRedirectProgIDs)(mdScope scope, HCORENUM *phEnum, mdTypeDef td, mdProgID rRedirectProgIDs[],
  684. ULONG cMax, ULONG* pcRedirectProgIDs) PURE;
  685. STDMETHOD(EnumMimeTypeImpls)(mdScope scope, HCORENUM *phEnum, mdTypeDef td, mdMimeTypeImpl rMimeTypeImpls[],
  686. ULONG cMax, ULONG* pcMimeTypeImpls) PURE;
  687. STDMETHOD(EnumFormatImpls)(mdScope scope, HCORENUM *phEnum, mdTypeDef td, mdFormatImpl rFormatImpls[],
  688. ULONG cMax, ULONG* pcFormatImpls) PURE;
  689. STDMETHOD(EnumRoleChecks)( // S_OK or error.
  690. mdScope scope, // [IN] Import scope.
  691. HCORENUM *phEnum, // [OUT] Return enumerator.
  692. mdToken tk, // [IN] Object to enumerate roles for.
  693. mdRoleCheck rRoleChecks[], // [OUT] Place cMax tokens here.
  694. ULONG cMax, // [IN] Max size of rRoleChecks.
  695. ULONG *pcRoleChecks) PURE; // [Out] Place count of returned role checks here.
  696. STDMETHOD(FindTypeDefByName)( // S_OK or error.
  697. mdScope scope, // [IN] The scope to search.
  698. LPCWSTR szNamespace, // [IN] Namespace with the Type.
  699. LPCWSTR szTypeDef, // [IN] Name of the Type.
  700. mdTypeDef *ptd) PURE; // [OUT] Put the TypeDef token here.
  701. STDMETHOD(FindTypeDefByGUID)( // S_OK or error.
  702. mdScope scope, // [IN] The scope to search.
  703. const GUID *pguid, // [IN] The GUID of the Type.
  704. mdTypeDef *ptd) PURE; // [OUT] Put the TypeDef token here.
  705. STDMETHOD(FindCustomValue)(mdScope scope, mdToken tk, LPCWSTR szName, mdCustomValue *pcv,
  706. DWORD *pdwValueType) PURE;
  707. STDMETHOD(GetScopeProps)(mdScope scope, LPWSTR szName, ULONG cchName, ULONG *pchName,
  708. GUID *ppid, GUID *pmvid, LCID *pLcid) PURE;
  709. STDMETHOD(GetModuleFromScope)( // S_OK.
  710. mdScope scope, // [IN] The scope.
  711. mdModule *pmd) PURE; // [OUT] Put mdModule token here.
  712. STDMETHOD(GetTypeDefProps)( // S_OK or error.
  713. mdScope scope, // [IN] The import scope.
  714. mdTypeDef td, // [IN] TypeDef token for inquiry.
  715. LPWSTR szNamespace, // [OUT] Put Namespace here.
  716. ULONG cchNamespace, // [IN] size of Namespace buffer in wide chars.
  717. ULONG *pchNamespace, // [OUT] put size of Namespace (wide chars) here.
  718. LPWSTR szTypeDef, // [OUT] Put name here.
  719. ULONG cchTypeDef, // [IN] size of name buffer in wide chars.
  720. ULONG *pchTypeDef, // [OUT] put size of name (wide chars) here.
  721. GUID *pguid, // [OUT] Put clsid here.
  722. CLASSVERSION *pver, // [OUT] Put version here.
  723. DWORD *pdwTypeDefFlags, // [OUT] Put flags here.
  724. mdToken *ptkExtends, // [OUT] Put base class TypeDef/TypeRef here.
  725. DWORD *pdwExtendsFlags) PURE; // [OUT] Put extends flags here.
  726. STDMETHOD(GetClassSvcsContext)(mdScope es, mdTypeDef td, DWORD *pdwClassActivateAttr, DWORD *pdwThreadAttr,
  727. DWORD *pdwXactonAttr, DWORD *pdwSynchAttr) PURE;
  728. STDMETHOD(GetInterfaceImplProps)( // S_OK or error.
  729. mdScope scope, // [IN] The scope.
  730. mdInterfaceImpl iiImpl, // [IN] InterfaceImpl token.
  731. mdTypeDef *pClass, // [OUT] Put implementing class token here.
  732. mdToken *ptkIface, // [OUT] Put implemented interface token here.
  733. DWORD *pdwFlags) PURE; // [OUT] Put implementation flags here.
  734. STDMETHOD(GetCustomValueProps)(mdScope scope, mdCustomValue cv, LPWSTR szName, ULONG cchName,
  735. ULONG *pchName, DWORD *pdwValueType) PURE;
  736. STDMETHOD(GetCustomValueAsBlob)(mdScope scope, mdCustomValue cv, void const **ppBlob, ULONG *pcbSize) PURE;
  737. STDMETHOD(GetTypeRefProps)(mdScope scope, mdTypeRef tr, LPWSTR szTypeRef,
  738. ULONG cchTypeRef, ULONG *pchTypeRef, GUID *pGuid, DWORD *pdwBind) PURE;
  739. STDMETHOD(GetModuleRegProps)(mdScope scope, DWORD *pModuleRegAttr, GUID *pguid) PURE;
  740. STDMETHOD(GetClassRegProps)(mdScope scope, mdTypeDef td,
  741. LPWSTR szProgid, ULONG cchProgid, ULONG *pchProgid,
  742. LPWSTR szVIProgid, ULONG cchVIProgid, ULONG *pchVIProgid,
  743. LPWSTR szIconURL, ULONG cchIconURL, ULONG *pchIconURL, ULONG *pIconResource,
  744. LPWSTR szSmallIconURL, ULONG cchSmallIconURL, ULONG *pchSmallIconURL, ULONG *pSmallIconResource,
  745. LPWSTR szDefaultDispname, ULONG cchDefaultDispname, ULONG *pchDefaultDispname) PURE;
  746. STDMETHOD(GetIfaceRegProps)(mdScope scope, mdTypeDef td, DWORD *pdwIfaceSvcs, GUID *pProxyStub) PURE;
  747. STDMETHOD(GetResourceProps)(mdScope scope, mdResource rs, LPWSTR szURL, ULONG cchURL, ULONG *pchURL) PURE;
  748. STDMETHOD(GetCategoryImplProps)(mdScope scope, mdCocatImpl cocat, GUID *pguid, DWORD *pdwCocatImplAttr) PURE;
  749. STDMETHOD(GetRedirectProgIDProps)(mdScope scope, mdProgID progid,
  750. LPWSTR szProgID, ULONG cchProgID, ULONG *pchProgID) PURE;
  751. STDMETHOD(GetMimeTypeImplProps)(mdScope scope, mdMimeTypeImpl mime,
  752. LPWSTR szMime, ULONG cchMime, ULONG *pchMime) PURE;
  753. STDMETHOD(GetFormatImplProps)(mdScope scope, mdFormatImpl format,
  754. LPWSTR szFormat, ULONG cchFormat, ULONG *pchFormat,
  755. DWORD *pdwRegFormatAttr) PURE;
  756. STDMETHOD(GetRoleCheckProps)( // S_OK or error.
  757. mdScope scope, // [IN] Import scope.
  758. mdRoleCheck rc, // [IN] The role check to get props for.
  759. LPWSTR szName, // [OUT] Buffer for name.
  760. ULONG cchName, // [IN] Max characters for szName.
  761. ULONG *pchName, // [OUT] Available string chars for szName.
  762. DWORD *pdwRoleFlags) PURE; // [OUT] Role flags go here.
  763. STDMETHOD(ResolveTypeRef)(mdScope is, mdTypeRef tr, mdScope *pes, mdTypeDef *ptd) PURE;
  764. };
  765. #endif // _META_DATA_NO_SCOPE_
  766. // Return to default padding.
  767. #include <poppack.h>
  768. #ifdef __cplusplus
  769. }
  770. #endif
  771. #endif // _CORREG_H_
  772. // EOF =======================================================================