home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / correg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  37.9 KB  |  940 lines

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