| 1 | // Licensed to the .NET Foundation under one or more agreements. |
| 2 | // The .NET Foundation licenses this file to you under the MIT license. |
| 3 | // See the LICENSE file in the project root for more information. |
| 4 | //***************************************************************************** |
| 5 | // MDCommon.h |
| 6 | // |
| 7 | |
| 8 | // |
| 9 | // Header for functions exported by metadata. These are consumed 2 ways: |
| 10 | // 1. Mscoree provides public exports that plumb to some of these functions to invoke these dynamically. |
| 11 | // 2. Standalone metadata (statically linked) |
| 12 | // |
| 13 | //***************************************************************************** |
| 14 | |
| 15 | |
| 16 | #ifndef _METADATA_EXPORTS_ |
| 17 | #define _METADATA_EXPORTS_ |
| 18 | |
| 19 | |
| 20 | |
| 21 | // General creation function for ClassFactory semantics. |
| 22 | STDAPI MetaDataDllGetClassObject(REFCLSID rclsid, REFIID riid, void ** ppv); |
| 23 | |
| 24 | // Specific creation function to get IMetaDataDispenser(Ex) interface. |
| 25 | HRESULT InternalCreateMetaDataDispenser(REFIID riid, void ** pMetaDataDispenserOut); |
| 26 | |
| 27 | STDAPI GetMDInternalInterface( |
| 28 | LPVOID pData, |
| 29 | ULONG cbData, |
| 30 | DWORD flags, // [IN] MDInternal_OpenForRead or MDInternal_OpenForENC |
| 31 | REFIID riid, // [in] The interface desired. |
| 32 | void **ppIUnk); // [out] Return interface on success. |
| 33 | |
| 34 | STDAPI GetMDInternalInterfaceFromPublic( |
| 35 | IUnknown *pIUnkPublic, // [IN] Given scope. |
| 36 | REFIID riid, // [in] The interface desired. |
| 37 | void **ppIUnkInternal); // [out] Return interface on success. |
| 38 | |
| 39 | STDAPI GetMDPublicInterfaceFromInternal( |
| 40 | void *pIUnkPublic, // [IN] Given scope. |
| 41 | REFIID riid, // [in] The interface desired. |
| 42 | void **ppIUnkInternal); // [out] Return interface on success. |
| 43 | |
| 44 | STDAPI MDReOpenMetaDataWithMemory( |
| 45 | void *pImport, // [IN] Given scope. public interfaces |
| 46 | LPCVOID pData, // [in] Location of scope data. |
| 47 | ULONG cbData); // [in] Size of the data pointed to by pData. |
| 48 | |
| 49 | STDAPI MDReOpenMetaDataWithMemoryEx( |
| 50 | void *pImport, // [IN] Given scope. public interfaces |
| 51 | LPCVOID pData, // [in] Location of scope data. |
| 52 | ULONG cbData, // [in] Size of the data pointed to by pData. |
| 53 | DWORD dwReOpenFlags); // [in] ReOpen flags |
| 54 | |
| 55 | |
| 56 | |
| 57 | #endif // _METADATA_EXPORTS_ |
| 58 | |