Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

171 lines
8.9 KiB

  1. extern const GUID __declspec(selectany) CLSID_CorMetaDataDispenser =
  2. { 0xe5cb7a31, 0x7512, 0x11d2, { 0x89, 0xce, 0x0, 0x80, 0xc7, 0x92, 0xe5, 0xd8 } };
  3. extern const GUID __declspec(selectany) IID_IMetaDataDispenser =
  4. { 0x809c652e, 0x7396, 0x11d2, { 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc } };
  5. extern const GUID __declspec(selectany) IID_IMetaDataImport =
  6. { 0x7dac8207, 0xd3ae, 0x4c75, { 0x9b, 0x67, 0x92, 0x80, 0x1a, 0x49, 0x7d, 0x44 } };
  7. extern const GUID __declspec(selectany) IID_IMetaDataAssemblyImport =
  8. { 0xee62470b, 0xe94b, 0x424e, { 0x9b, 0x7c, 0x2f, 0x0, 0xc9, 0x24, 0x9f, 0x93 } };
  9. typedef PVOID HCORENUM;
  10. typedef DWORD mdAssembly;
  11. typedef DWORD mdAssemblyRef;
  12. typedef DWORD mdFile;
  13. typedef DWORD mdExportedType;
  14. typedef DWORD mdToken;
  15. typedef DWORD mdTypeDef;
  16. typedef DWORD mdManifestResource;
  17. typedef DWORD mdInterfaceImpl;
  18. typedef DWORD mdTypeRef;
  19. #undef INTERFACE
  20. #define INTERFACE IMetaDataAssemblyImport
  21. DECLARE_INTERFACE_(IMetaDataAssemblyImport, IUnknown)
  22. {
  23. STDMETHOD(QueryInterface) (THIS_
  24. REFIID riid,
  25. LPVOID FAR* ppvObj) PURE;
  26. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  27. STDMETHOD_(ULONG,Release) (THIS) PURE;
  28. STDMETHOD(GetAssemblyProps)( // S_OK or error.
  29. THIS_
  30. mdAssembly mda, // [IN] The Assembly for which to get the properties.
  31. const void **ppbPublicKey, // [OUT] Pointer to the public key.
  32. ULONG *pcbPublicKey, // [OUT] Count of bytes in the public key.
  33. ULONG *pulHashAlgId, // [OUT] Hash Algorithm.
  34. LPWSTR szName, // [OUT] Buffer to fill with name.
  35. ULONG cchName, // [IN] Size of buffer in wide chars.
  36. ULONG *pchName, // [OUT] Actual # of wide chars in name.
  37. void *pMetaData, // [OUT] Assembly MetaData.
  38. DWORD *pdwAssemblyFlags) PURE; // [OUT] Flags.
  39. STDMETHOD(GetAssemblyRefProps)( // S_OK or error.
  40. THIS_
  41. mdAssemblyRef mdar, // [IN] The AssemblyRef for which to get the properties.
  42. const void **ppbPublicKeyOrToken, // [OUT] Pointer to the public key or token.
  43. ULONG *pcbPublicKeyOrToken, // [OUT] Count of bytes in the public key or token.
  44. LPWSTR szName, // [OUT] Buffer to fill with name.
  45. ULONG cchName, // [IN] Size of buffer in wide chars.
  46. ULONG *pchName, // [OUT] Actual # of wide chars in name.
  47. void *pMetaData, // [OUT] Assembly MetaData.
  48. const void **ppbHashValue, // [OUT] Hash blob.
  49. ULONG *pcbHashValue, // [OUT] Count of bytes in the hash blob.
  50. DWORD *pdwAssemblyRefFlags) PURE; // [OUT] Flags.
  51. STDMETHOD(GetFileProps)( // S_OK or error.
  52. THIS_
  53. mdFile mdf, // [IN] The File for which to get the properties.
  54. LPWSTR szName, // [OUT] Buffer to fill with name.
  55. ULONG cchName, // [IN] Size of buffer in wide chars.
  56. ULONG *pchName, // [OUT] Actual # of wide chars in name.
  57. const void **ppbHashValue, // [OUT] Pointer to the Hash Value Blob.
  58. ULONG *pcbHashValue, // [OUT] Count of bytes in the Hash Value Blob.
  59. DWORD *pdwFileFlags) PURE; // [OUT] Flags.
  60. STDMETHOD(GetExportedTypeProps)( // S_OK or error.
  61. THIS_
  62. mdExportedType mdct, // [IN] The ExportedType for which to get the properties.
  63. LPWSTR szName, // [OUT] Buffer to fill with name.
  64. ULONG cchName, // [IN] Size of buffer in wide chars.
  65. ULONG *pchName, // [OUT] Actual # of wide chars in name.
  66. mdToken *ptkImplementation, // [OUT] mdFile or mdAssemblyRef or mdExportedType.
  67. mdTypeDef *ptkTypeDef, // [OUT] TypeDef token within the file.
  68. DWORD *pdwExportedTypeFlags) PURE; // [OUT] Flags.
  69. STDMETHOD(GetManifestResourceProps)( // S_OK or error.
  70. THIS_
  71. mdManifestResource mdmr, // [IN] The ManifestResource for which to get the properties.
  72. LPWSTR szName, // [OUT] Buffer to fill with name.
  73. ULONG cchName, // [IN] Size of buffer in wide chars.
  74. ULONG *pchName, // [OUT] Actual # of wide chars in name.
  75. mdToken *ptkImplementation, // [OUT] mdFile or mdAssemblyRef that provides the ManifestResource.
  76. DWORD *pdwOffset, // [OUT] Offset to the beginning of the resource within the file.
  77. DWORD *pdwResourceFlags) PURE;// [OUT] Flags.
  78. STDMETHOD(EnumAssemblyRefs)( // S_OK or error
  79. THIS_
  80. HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
  81. mdAssemblyRef rAssemblyRefs[], // [OUT] Put AssemblyRefs here.
  82. ULONG cMax, // [IN] Max AssemblyRefs to put.
  83. ULONG *pcTokens) PURE; // [OUT] Put # put here.
  84. STDMETHOD(EnumFiles)( // S_OK or error
  85. THIS_
  86. HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
  87. mdFile rFiles[], // [OUT] Put Files here.
  88. ULONG cMax, // [IN] Max Files to put.
  89. ULONG *pcTokens) PURE; // [OUT] Put # put here.
  90. };
  91. #undef INTERFACE
  92. #define INTERFACE IMetaDataImport
  93. DECLARE_INTERFACE_(IMetaDataImport, IUnknown)
  94. {
  95. STDMETHOD(QueryInterface) (THIS_
  96. REFIID riid,
  97. LPVOID FAR* ppvObj) PURE;
  98. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  99. STDMETHOD_(ULONG,Release) (THIS) PURE;
  100. STDMETHOD_(void, CloseEnum)(THIS_ HCORENUM hEnum) PURE;
  101. STDMETHOD(CountEnum)(THIS_ HCORENUM hEnum, ULONG *pulCount) PURE;
  102. STDMETHOD(ResetEnum)(THIS_ HCORENUM hEnum, ULONG ulPos) PURE;
  103. STDMETHOD(EnumTypeDefs)(THIS_ HCORENUM *phEnum, mdTypeDef rTypeDefs[],
  104. ULONG cMax, ULONG *pcTypeDefs) PURE;
  105. STDMETHOD(EnumInterfaceImpls)(THIS_ HCORENUM *phEnum, mdTypeDef td,
  106. mdInterfaceImpl rImpls[], ULONG cMax,
  107. ULONG* pcImpls) PURE;
  108. STDMETHOD(EnumTypeRefs)(THIS_ HCORENUM *phEnum, mdTypeRef rTypeRefs[],
  109. ULONG cMax, ULONG* pcTypeRefs) PURE;
  110. STDMETHOD(FindTypeDefByName)( // S_OK or error.
  111. THIS_
  112. LPCWSTR szTypeDef, // [IN] Name of the Type.
  113. mdToken tkEnclosingClass, // [IN] TypeDef/TypeRef for Enclosing class.
  114. mdTypeDef *ptd) PURE; // [OUT] Put the TypeDef token here.
  115. STDMETHOD(GetScopeProps)( // S_OK or error.
  116. THIS_
  117. LPWSTR szName, // [OUT] Put the name here.
  118. ULONG cchName, // [IN] Size of name buffer in wide chars.
  119. ULONG *pchName, // [OUT] Put size of name (wide chars) here.
  120. GUID *pmvid) PURE; // [OUT, OPTIONAL] Put MVID here.
  121. };
  122. #undef INTERFACE
  123. #define INTERFACE IMetaDataDispenser
  124. DECLARE_INTERFACE_(IMetaDataDispenser, IUnknown)
  125. {
  126. STDMETHOD(QueryInterface) (THIS_
  127. REFIID riid,
  128. LPVOID FAR* ppvObj) PURE;
  129. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  130. STDMETHOD_(ULONG,Release) (THIS) PURE;
  131. STDMETHOD(DefineScope)( // Return code.
  132. THIS_
  133. REFCLSID rclsid, // [in] What version to create.
  134. DWORD dwCreateFlags, // [in] Flags on the create.
  135. REFIID riid, // [in] The interface desired.
  136. IUnknown **ppIUnk) PURE; // [out] Return interface on success.
  137. STDMETHOD(OpenScope)( // Return code.
  138. THIS_
  139. LPCWSTR szScope, // [in] The scope to open.
  140. DWORD dwOpenFlags, // [in] Open mode flags.
  141. REFIID riid, // [in] The interface desired.
  142. IUnknown **ppIUnk) PURE; // [out] Return interface on success.
  143. STDMETHOD(OpenScopeOnMemory)( // Return code.
  144. THIS_
  145. LPCVOID pData, // [in] Location of scope data.
  146. ULONG cbData, // [in] Size of the data pointed to by pData.
  147. DWORD dwOpenFlags, // [in] Open mode flags.
  148. REFIID riid, // [in] The interface desired.
  149. IUnknown **ppIUnk) PURE; // [out] Return interface on success.
  150. };