| 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 | // MDInternalDispenser.h |
| 6 | // |
| 7 | |
| 8 | // |
| 9 | // Contains utility code for MD directory |
| 10 | // |
| 11 | //***************************************************************************** |
| 12 | #ifndef __MDInternalDispenser__h__ |
| 13 | #define __MDInternalDispenser__h__ |
| 14 | |
| 15 | #ifdef FEATURE_METADATA_INTERNAL_APIS |
| 16 | |
| 17 | #include "mdinternalro.h" |
| 18 | |
| 19 | |
| 20 | enum MDFileFormat |
| 21 | { |
| 22 | MDFormat_ReadOnly = 0, |
| 23 | MDFormat_ReadWrite = 1, |
| 24 | MDFormat_ICR = 2, |
| 25 | MDFormat_Invalid = 3 |
| 26 | }; |
| 27 | |
| 28 | |
| 29 | HRESULT CheckFileFormat(LPVOID pData, ULONG cbData, MDFileFormat *pFormat); |
| 30 | STDAPI GetMDInternalInterface( |
| 31 | LPVOID pData, // [IN] Buffer with the metadata. |
| 32 | ULONG cbData, // [IN] Size of the data in the buffer. |
| 33 | DWORD flags, // [IN] MDInternal_OpenForRead or MDInternal_OpenForENC |
| 34 | REFIID riid, // [in] The interface desired. |
| 35 | void **ppIUnk); // [out] Return interface on success. |
| 36 | |
| 37 | HRESULT GetAssemblyMDInternalImportHelper(HCORMODULE hModule, |
| 38 | REFIID riid, |
| 39 | MDInternalImportFlags flags, |
| 40 | IUnknown **ppIUnk); |
| 41 | |
| 42 | #endif //FEATURE_METADATA_INTERNAL_APIS |
| 43 | |
| 44 | #endif // __MDInternalDispenser__h__ |
| 45 | |