summaryrefslogtreecommitdiff
path: root/src/md/runtime/mdinternaldisp.h
blob: 689e1f498e612750a72adccab9ad99ad49225b62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//*****************************************************************************
// MDInternalDispenser.h
// 

//
// Contains utility code for MD directory
//
//*****************************************************************************
#ifndef __MDInternalDispenser__h__
#define __MDInternalDispenser__h__

#ifdef FEATURE_METADATA_INTERNAL_APIS

#include "mdinternalro.h"


enum MDFileFormat
{
    MDFormat_ReadOnly = 0,
    MDFormat_ReadWrite = 1,
    MDFormat_ICR = 2,
    MDFormat_Invalid = 3
};


HRESULT CheckFileFormat(LPVOID pData, ULONG cbData, MDFileFormat *pFormat);
STDAPI GetMDInternalInterface(
    LPVOID      pData,                  // [IN] Buffer with the metadata.
    ULONG       cbData,                 // [IN] Size of the data in the buffer.
    DWORD       flags,                  // [IN] MDInternal_OpenForRead or MDInternal_OpenForENC
    REFIID      riid,                   // [in] The interface desired.
    void        **ppIUnk);              // [out] Return interface on success.

HRESULT GetAssemblyMDInternalImportHelper(HCORMODULE hModule,
                                          REFIID     riid,
                                          MDInternalImportFlags flags,
                                          IUnknown   **ppIUnk);

#endif //FEATURE_METADATA_INTERNAL_APIS

#endif // __MDInternalDispenser__h__