~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/mscoree/metadata.c

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  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 <stdio.h>
 22 #include <stdarg.h>
 23 #include <assert.h>
 24 
 25 #define COBJMACROS
 26 
 27 #include "wine/library.h"
 28 #include "windef.h"
 29 #include "winbase.h"
 30 #include "winreg.h"
 31 #include "ole2.h"
 32 #include "cor.h"
 33 #include "mscoree.h"
 34 #include "corhdr.h"
 35 #include "cordebug.h"
 36 #include "metahost.h"
 37 #include "wine/list.h"
 38 #include "mscoree_private.h"
 39 
 40 #include "wine/debug.h"
 41 
 42 WINE_DEFAULT_DEBUG_CHANNEL( mscoree );
 43 
 44 typedef struct MetaDataDispenser
 45 {
 46     IMetaDataDispenserEx IMetaDataDispenserEx_iface;
 47     LONG ref;
 48 } MetaDataDispenser;
 49 
 50 static inline MetaDataDispenser *impl_from_IMetaDataDispenserEx(IMetaDataDispenserEx *iface)
 51 {
 52     return CONTAINING_RECORD(iface, MetaDataDispenser, IMetaDataDispenserEx_iface);
 53 }
 54 
 55 static HRESULT WINAPI MetaDataDispenser_QueryInterface(IMetaDataDispenserEx* iface,
 56     REFIID riid, void **ppvObject)
 57 {
 58     TRACE("%p %s %p\n", iface, debugstr_guid(riid), ppvObject);
 59 
 60     if (IsEqualGUID(riid, &IID_IMetaDataDispenserEx) ||
 61         IsEqualGUID(riid, &IID_IMetaDataDispenser) ||
 62         IsEqualGUID(riid, &IID_IUnknown))
 63     {
 64         *ppvObject = iface;
 65     }
 66     else
 67     {
 68         FIXME("Unsupported interface %s\n", debugstr_guid(riid));
 69         return E_NOINTERFACE;
 70     }
 71 
 72     IMetaDataDispenserEx_AddRef( iface );
 73 
 74     return S_OK;
 75 }
 76 
 77 static ULONG WINAPI MetaDataDispenser_AddRef(IMetaDataDispenserEx* iface)
 78 {
 79     MetaDataDispenser *This = impl_from_IMetaDataDispenserEx(iface);
 80     ULONG ref = InterlockedIncrement(&This->ref);
 81 
 82     TRACE("%p ref=%u\n", This, ref);
 83 
 84     return ref;
 85 }
 86 
 87 static ULONG WINAPI MetaDataDispenser_Release(IMetaDataDispenserEx* iface)
 88 {
 89     MetaDataDispenser *This = impl_from_IMetaDataDispenserEx(iface);
 90     ULONG ref = InterlockedDecrement(&This->ref);
 91 
 92     TRACE("%p ref=%u\n", This, ref);
 93 
 94     if (ref == 0)
 95     {
 96         HeapFree(GetProcessHeap(), 0, This);
 97     }
 98 
 99     return ref;
100 }
101 
102 static HRESULT WINAPI MetaDataDispenser_DefineScope(IMetaDataDispenserEx* iface,
103     REFCLSID rclsid, DWORD dwCreateFlags, REFIID riid, IUnknown **ppIUnk)
104 {
105     FIXME("%p %s %x %s %p\n", iface, debugstr_guid(rclsid), dwCreateFlags,
106         debugstr_guid(riid), ppIUnk);
107     return E_NOTIMPL;
108 }
109 
110 static HRESULT WINAPI MetaDataDispenser_OpenScope(IMetaDataDispenserEx* iface,
111     LPCWSTR szScope, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk)
112 {
113     FIXME("%p %s %x %s %p\n", iface, debugstr_w(szScope), dwOpenFlags,
114         debugstr_guid(riid), ppIUnk);
115     return E_NOTIMPL;
116 }
117 
118 static HRESULT WINAPI MetaDataDispenser_OpenScopeOnMemory(IMetaDataDispenserEx* iface,
119     const void *pData, ULONG cbData, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk)
120 {
121     FIXME("%p %p %u %x %s %p\n", iface, pData, cbData, dwOpenFlags,
122         debugstr_guid(riid), ppIUnk);
123     return E_NOTIMPL;
124 }
125 
126 static HRESULT WINAPI MetaDataDispenser_SetOption(IMetaDataDispenserEx* iface,
127     REFGUID optionid, const VARIANT *value)
128 {
129     FIXME("%p %s\n", iface, debugstr_guid(optionid));
130     return E_NOTIMPL;
131 }
132 
133 static HRESULT WINAPI MetaDataDispenser_GetOption(IMetaDataDispenserEx* iface,
134     REFGUID optionid, VARIANT *pvalue)
135 {
136     FIXME("%p %s\n", iface, debugstr_guid(optionid));
137     return E_NOTIMPL;
138 }
139 
140 static HRESULT WINAPI MetaDataDispenser_OpenScopeOnITypeInfo(IMetaDataDispenserEx* iface,
141     ITypeInfo *pITI, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk)
142 {
143     FIXME("%p %p %u %s %p\n", iface, pITI, dwOpenFlags, debugstr_guid(riid), ppIUnk);
144     return E_NOTIMPL;
145 }
146 
147 static HRESULT WINAPI MetaDataDispenser_GetCORSystemDirectory(IMetaDataDispenserEx* iface,
148     LPWSTR szBuffer, DWORD cchBuffer, DWORD *pchBuffer)
149 {
150     FIXME("%p %p %u %p\n", iface, szBuffer, cchBuffer, pchBuffer);
151     return E_NOTIMPL;
152 }
153 
154 static HRESULT WINAPI MetaDataDispenser_FindAssembly(IMetaDataDispenserEx* iface,
155     LPCWSTR szAppBase, LPCWSTR szPrivateBin, LPCWSTR szGlobalBin, LPCWSTR szAssemblyName,
156     LPWSTR szName, ULONG cchName, ULONG *pcName)
157 {
158     FIXME("%p %s %s %s %s %p %u %p\n", iface, debugstr_w(szAppBase),
159         debugstr_w(szPrivateBin), debugstr_w(szGlobalBin),
160         debugstr_w(szAssemblyName), szName, cchName, pcName);
161     return E_NOTIMPL;
162 }
163 
164 static HRESULT WINAPI MetaDataDispenser_FindAssemblyModule(IMetaDataDispenserEx* iface,
165     LPCWSTR szAppBase, LPCWSTR szPrivateBin, LPCWSTR szGlobalBin, LPCWSTR szAssemblyName,
166     LPCWSTR szModuleName, LPWSTR szName, ULONG cchName, ULONG *pcName)
167 {
168     FIXME("%p %s %s %s %s %s %p %u %p\n", iface, debugstr_w(szAppBase),
169         debugstr_w(szPrivateBin), debugstr_w(szGlobalBin), debugstr_w(szAssemblyName),
170         debugstr_w(szModuleName), szName, cchName, pcName);
171     return E_NOTIMPL;
172 }
173 
174 static const struct IMetaDataDispenserExVtbl MetaDataDispenserVtbl =
175 {
176     MetaDataDispenser_QueryInterface,
177     MetaDataDispenser_AddRef,
178     MetaDataDispenser_Release,
179     MetaDataDispenser_DefineScope,
180     MetaDataDispenser_OpenScope,
181     MetaDataDispenser_OpenScopeOnMemory,
182     MetaDataDispenser_SetOption,
183     MetaDataDispenser_GetOption,
184     MetaDataDispenser_OpenScopeOnITypeInfo,
185     MetaDataDispenser_GetCORSystemDirectory,
186     MetaDataDispenser_FindAssembly,
187     MetaDataDispenser_FindAssemblyModule
188 };
189 
190 HRESULT MetaDataDispenser_CreateInstance(IUnknown **ppUnk)
191 {
192     MetaDataDispenser *This;
193 
194     This = HeapAlloc(GetProcessHeap(), 0, sizeof(MetaDataDispenser));
195 
196     if (!This)
197         return E_OUTOFMEMORY;
198 
199     This->IMetaDataDispenserEx_iface.lpVtbl = &MetaDataDispenserVtbl;
200     This->ref = 1;
201 
202     *ppUnk = (IUnknown*)This;
203 
204     return S_OK;
205 }
206 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.