ReactOS 0.4.15-dev-8100-g1887773
metadata.c
Go to the documentation of this file.
1/*
2 * IMetaDataDispenserEx - dynamic creation/editing of assemblies
3 *
4 * Copyright 2010 Vincent Povirk for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include "mscoree_private.h"
22
23typedef struct MetaDataDispenser
24{
28
30{
31 return CONTAINING_RECORD(iface, MetaDataDispenser, IMetaDataDispenserEx_iface);
32}
33
35 REFIID riid, void **ppvObject)
36{
37 TRACE("%p %s %p\n", iface, debugstr_guid(riid), ppvObject);
38
39 if (IsEqualGUID(riid, &IID_IMetaDataDispenserEx) ||
40 IsEqualGUID(riid, &IID_IMetaDataDispenser) ||
42 {
43 *ppvObject = iface;
44 }
45 else
46 {
47 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
48 return E_NOINTERFACE;
49 }
50
51 IMetaDataDispenserEx_AddRef( iface );
52
53 return S_OK;
54}
55
57{
60
61 TRACE("%p ref=%u\n", This, ref);
62
63 return ref;
64}
65
67{
70
71 TRACE("%p ref=%u\n", This, ref);
72
73 if (ref == 0)
74 {
76 }
77
78 return ref;
79}
80
82 REFCLSID rclsid, DWORD dwCreateFlags, REFIID riid, IUnknown **ppIUnk)
83{
84 FIXME("%p %s %x %s %p\n", iface, debugstr_guid(rclsid), dwCreateFlags,
85 debugstr_guid(riid), ppIUnk);
86 return E_NOTIMPL;
87}
88
90 LPCWSTR szScope, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk)
91{
92 FIXME("%p %s %x %s %p\n", iface, debugstr_w(szScope), dwOpenFlags,
93 debugstr_guid(riid), ppIUnk);
94 return E_NOTIMPL;
95}
96
98 const void *pData, ULONG cbData, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk)
99{
100 FIXME("%p %p %u %x %s %p\n", iface, pData, cbData, dwOpenFlags,
101 debugstr_guid(riid), ppIUnk);
102 return E_NOTIMPL;
103}
104
106 REFGUID optionid, const VARIANT *value)
107{
108 FIXME("%p %s\n", iface, debugstr_guid(optionid));
109 return E_NOTIMPL;
110}
111
113 REFGUID optionid, VARIANT *pvalue)
114{
115 FIXME("%p %s\n", iface, debugstr_guid(optionid));
116 return E_NOTIMPL;
117}
118
120 ITypeInfo *pITI, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk)
121{
122 FIXME("%p %p %u %s %p\n", iface, pITI, dwOpenFlags, debugstr_guid(riid), ppIUnk);
123 return E_NOTIMPL;
124}
125
127 LPWSTR szBuffer, DWORD cchBuffer, DWORD *pchBuffer)
128{
129 FIXME("%p %p %u %p\n", iface, szBuffer, cchBuffer, pchBuffer);
130 return E_NOTIMPL;
131}
132
134 LPCWSTR szAppBase, LPCWSTR szPrivateBin, LPCWSTR szGlobalBin, LPCWSTR szAssemblyName,
135 LPWSTR szName, ULONG cchName, ULONG *pcName)
136{
137 FIXME("%p %s %s %s %s %p %u %p\n", iface, debugstr_w(szAppBase),
138 debugstr_w(szPrivateBin), debugstr_w(szGlobalBin),
140 return E_NOTIMPL;
141}
142
144 LPCWSTR szAppBase, LPCWSTR szPrivateBin, LPCWSTR szGlobalBin, LPCWSTR szAssemblyName,
146{
147 FIXME("%p %s %s %s %s %s %p %u %p\n", iface, debugstr_w(szAppBase),
148 debugstr_w(szPrivateBin), debugstr_w(szGlobalBin), debugstr_w(szAssemblyName),
150 return E_NOTIMPL;
151}
152
153static const struct IMetaDataDispenserExVtbl MetaDataDispenserVtbl =
154{
167};
168
170{
172
174
175 if (!This)
176 return E_OUTOFMEMORY;
177
178 This->IMetaDataDispenserEx_iface.lpVtbl = &MetaDataDispenserVtbl;
179 This->ref = 1;
180
181 *ppUnk = (IUnknown*)This;
182
183 return S_OK;
184}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:114
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
static DWORD cchBuffer
Definition: fusion.c:85
static HRESULT WINAPI MetaDataDispenser_QueryInterface(IMetaDataDispenserEx *iface, REFIID riid, void **ppvObject)
Definition: metadata.c:34
static ULONG WINAPI MetaDataDispenser_Release(IMetaDataDispenserEx *iface)
Definition: metadata.c:66
static HRESULT WINAPI MetaDataDispenser_GetOption(IMetaDataDispenserEx *iface, REFGUID optionid, VARIANT *pvalue)
Definition: metadata.c:112
static HRESULT WINAPI MetaDataDispenser_FindAssemblyModule(IMetaDataDispenserEx *iface, LPCWSTR szAppBase, LPCWSTR szPrivateBin, LPCWSTR szGlobalBin, LPCWSTR szAssemblyName, LPCWSTR szModuleName, LPWSTR szName, ULONG cchName, ULONG *pcName)
Definition: metadata.c:143
static HRESULT WINAPI MetaDataDispenser_OpenScopeOnMemory(IMetaDataDispenserEx *iface, const void *pData, ULONG cbData, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk)
Definition: metadata.c:97
static ULONG WINAPI MetaDataDispenser_AddRef(IMetaDataDispenserEx *iface)
Definition: metadata.c:56
static HRESULT WINAPI MetaDataDispenser_DefineScope(IMetaDataDispenserEx *iface, REFCLSID rclsid, DWORD dwCreateFlags, REFIID riid, IUnknown **ppIUnk)
Definition: metadata.c:81
static HRESULT WINAPI MetaDataDispenser_FindAssembly(IMetaDataDispenserEx *iface, LPCWSTR szAppBase, LPCWSTR szPrivateBin, LPCWSTR szGlobalBin, LPCWSTR szAssemblyName, LPWSTR szName, ULONG cchName, ULONG *pcName)
Definition: metadata.c:133
static MetaDataDispenser * impl_from_IMetaDataDispenserEx(IMetaDataDispenserEx *iface)
Definition: metadata.c:29
static HRESULT WINAPI MetaDataDispenser_OpenScopeOnITypeInfo(IMetaDataDispenserEx *iface, ITypeInfo *pITI, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk)
Definition: metadata.c:119
static HRESULT WINAPI MetaDataDispenser_SetOption(IMetaDataDispenserEx *iface, REFGUID optionid, const VARIANT *value)
Definition: metadata.c:105
static HRESULT WINAPI MetaDataDispenser_OpenScope(IMetaDataDispenserEx *iface, LPCWSTR szScope, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk)
Definition: metadata.c:89
static const struct IMetaDataDispenserExVtbl MetaDataDispenserVtbl
Definition: metadata.c:153
static HRESULT WINAPI MetaDataDispenser_GetCORSystemDirectory(IMetaDataDispenserEx *iface, LPWSTR szBuffer, DWORD cchBuffer, DWORD *pchBuffer)
Definition: metadata.c:126
HRESULT MetaDataDispenser_CreateInstance(IUnknown **ppUnk)
Definition: metadata.c:169
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
LPCWSTR LPCWSTR szModuleName
Definition: env.c:37
static LPCWSTR szAssemblyName
Definition: asmenum.c:37
long LONG
Definition: pedump.c:60
static const WCHAR szName[]
Definition: powrprof.c:45
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define TRACE(s)
Definition: solgame.cpp:4
IMetaDataDispenserEx IMetaDataDispenserEx_iface
Definition: metadata.c:25
Definition: scsiwmi.h:51
Definition: send.c:48
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: pdh_main.c:94
_In_ PSID _Out_writes_to_opt_ cchName LPSTR _Inout_ LPDWORD cchName
Definition: winbase.h:2767
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185