Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmetadata.c
Go to the documentation of this file.
00001 /* 00002 * IMetaDataDispenserEx - dynamic creation/editing of assemblies 00003 * 00004 * Copyright 2010 Vincent Povirk for CodeWeavers 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #include <stdio.h> 00022 #include <stdarg.h> 00023 #include <assert.h> 00024 00025 #define COBJMACROS 00026 00027 #include "wine/library.h" 00028 #include "windef.h" 00029 #include "winbase.h" 00030 #include "winreg.h" 00031 #include "ole2.h" 00032 #include "cor.h" 00033 #include "mscoree.h" 00034 #include "corhdr.h" 00035 #include "cordebug.h" 00036 #include "metahost.h" 00037 #include "wine/list.h" 00038 #include "mscoree_private.h" 00039 00040 #include "wine/debug.h" 00041 00042 WINE_DEFAULT_DEBUG_CHANNEL( mscoree ); 00043 00044 typedef struct MetaDataDispenser 00045 { 00046 IMetaDataDispenserEx IMetaDataDispenserEx_iface; 00047 LONG ref; 00048 } MetaDataDispenser; 00049 00050 static inline MetaDataDispenser *impl_from_IMetaDataDispenserEx(IMetaDataDispenserEx *iface) 00051 { 00052 return CONTAINING_RECORD(iface, MetaDataDispenser, IMetaDataDispenserEx_iface); 00053 } 00054 00055 static HRESULT WINAPI MetaDataDispenser_QueryInterface(IMetaDataDispenserEx* iface, 00056 REFIID riid, void **ppvObject) 00057 { 00058 TRACE("%p %s %p\n", iface, debugstr_guid(riid), ppvObject); 00059 00060 if (IsEqualGUID(riid, &IID_IMetaDataDispenserEx) || 00061 IsEqualGUID(riid, &IID_IMetaDataDispenser) || 00062 IsEqualGUID(riid, &IID_IUnknown)) 00063 { 00064 *ppvObject = iface; 00065 } 00066 else 00067 { 00068 FIXME("Unsupported interface %s\n", debugstr_guid(riid)); 00069 return E_NOINTERFACE; 00070 } 00071 00072 IMetaDataDispenserEx_AddRef( iface ); 00073 00074 return S_OK; 00075 } 00076 00077 static ULONG WINAPI MetaDataDispenser_AddRef(IMetaDataDispenserEx* iface) 00078 { 00079 MetaDataDispenser *This = impl_from_IMetaDataDispenserEx(iface); 00080 ULONG ref = InterlockedIncrement(&This->ref); 00081 00082 TRACE("%p ref=%u\n", This, ref); 00083 00084 return ref; 00085 } 00086 00087 static ULONG WINAPI MetaDataDispenser_Release(IMetaDataDispenserEx* iface) 00088 { 00089 MetaDataDispenser *This = impl_from_IMetaDataDispenserEx(iface); 00090 ULONG ref = InterlockedDecrement(&This->ref); 00091 00092 TRACE("%p ref=%u\n", This, ref); 00093 00094 if (ref == 0) 00095 { 00096 HeapFree(GetProcessHeap(), 0, This); 00097 } 00098 00099 return ref; 00100 } 00101 00102 static HRESULT WINAPI MetaDataDispenser_DefineScope(IMetaDataDispenserEx* iface, 00103 REFCLSID rclsid, DWORD dwCreateFlags, REFIID riid, IUnknown **ppIUnk) 00104 { 00105 FIXME("%p %s %x %s %p\n", iface, debugstr_guid(rclsid), dwCreateFlags, 00106 debugstr_guid(riid), ppIUnk); 00107 return E_NOTIMPL; 00108 } 00109 00110 static HRESULT WINAPI MetaDataDispenser_OpenScope(IMetaDataDispenserEx* iface, 00111 LPCWSTR szScope, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk) 00112 { 00113 FIXME("%p %s %x %s %p\n", iface, debugstr_w(szScope), dwOpenFlags, 00114 debugstr_guid(riid), ppIUnk); 00115 return E_NOTIMPL; 00116 } 00117 00118 static HRESULT WINAPI MetaDataDispenser_OpenScopeOnMemory(IMetaDataDispenserEx* iface, 00119 const void *pData, ULONG cbData, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk) 00120 { 00121 FIXME("%p %p %u %x %s %p\n", iface, pData, cbData, dwOpenFlags, 00122 debugstr_guid(riid), ppIUnk); 00123 return E_NOTIMPL; 00124 } 00125 00126 static HRESULT WINAPI MetaDataDispenser_SetOption(IMetaDataDispenserEx* iface, 00127 REFGUID optionid, const VARIANT *value) 00128 { 00129 FIXME("%p %s\n", iface, debugstr_guid(optionid)); 00130 return E_NOTIMPL; 00131 } 00132 00133 static HRESULT WINAPI MetaDataDispenser_GetOption(IMetaDataDispenserEx* iface, 00134 REFGUID optionid, VARIANT *pvalue) 00135 { 00136 FIXME("%p %s\n", iface, debugstr_guid(optionid)); 00137 return E_NOTIMPL; 00138 } 00139 00140 static HRESULT WINAPI MetaDataDispenser_OpenScopeOnITypeInfo(IMetaDataDispenserEx* iface, 00141 ITypeInfo *pITI, DWORD dwOpenFlags, REFIID riid, IUnknown **ppIUnk) 00142 { 00143 FIXME("%p %p %u %s %p\n", iface, pITI, dwOpenFlags, debugstr_guid(riid), ppIUnk); 00144 return E_NOTIMPL; 00145 } 00146 00147 static HRESULT WINAPI MetaDataDispenser_GetCORSystemDirectory(IMetaDataDispenserEx* iface, 00148 LPWSTR szBuffer, DWORD cchBuffer, DWORD *pchBuffer) 00149 { 00150 FIXME("%p %p %u %p\n", iface, szBuffer, cchBuffer, pchBuffer); 00151 return E_NOTIMPL; 00152 } 00153 00154 static HRESULT WINAPI MetaDataDispenser_FindAssembly(IMetaDataDispenserEx* iface, 00155 LPCWSTR szAppBase, LPCWSTR szPrivateBin, LPCWSTR szGlobalBin, LPCWSTR szAssemblyName, 00156 LPWSTR szName, ULONG cchName, ULONG *pcName) 00157 { 00158 FIXME("%p %s %s %s %s %p %u %p\n", iface, debugstr_w(szAppBase), 00159 debugstr_w(szPrivateBin), debugstr_w(szGlobalBin), 00160 debugstr_w(szAssemblyName), szName, cchName, pcName); 00161 return E_NOTIMPL; 00162 } 00163 00164 static HRESULT WINAPI MetaDataDispenser_FindAssemblyModule(IMetaDataDispenserEx* iface, 00165 LPCWSTR szAppBase, LPCWSTR szPrivateBin, LPCWSTR szGlobalBin, LPCWSTR szAssemblyName, 00166 LPCWSTR szModuleName, LPWSTR szName, ULONG cchName, ULONG *pcName) 00167 { 00168 FIXME("%p %s %s %s %s %s %p %u %p\n", iface, debugstr_w(szAppBase), 00169 debugstr_w(szPrivateBin), debugstr_w(szGlobalBin), debugstr_w(szAssemblyName), 00170 debugstr_w(szModuleName), szName, cchName, pcName); 00171 return E_NOTIMPL; 00172 } 00173 00174 static const struct IMetaDataDispenserExVtbl MetaDataDispenserVtbl = 00175 { 00176 MetaDataDispenser_QueryInterface, 00177 MetaDataDispenser_AddRef, 00178 MetaDataDispenser_Release, 00179 MetaDataDispenser_DefineScope, 00180 MetaDataDispenser_OpenScope, 00181 MetaDataDispenser_OpenScopeOnMemory, 00182 MetaDataDispenser_SetOption, 00183 MetaDataDispenser_GetOption, 00184 MetaDataDispenser_OpenScopeOnITypeInfo, 00185 MetaDataDispenser_GetCORSystemDirectory, 00186 MetaDataDispenser_FindAssembly, 00187 MetaDataDispenser_FindAssemblyModule 00188 }; 00189 00190 HRESULT MetaDataDispenser_CreateInstance(IUnknown **ppUnk) 00191 { 00192 MetaDataDispenser *This; 00193 00194 This = HeapAlloc(GetProcessHeap(), 0, sizeof(MetaDataDispenser)); 00195 00196 if (!This) 00197 return E_OUTOFMEMORY; 00198 00199 This->IMetaDataDispenserEx_iface.lpVtbl = &MetaDataDispenserVtbl; 00200 This->ref = 1; 00201 00202 *ppUnk = (IUnknown*)This; 00203 00204 return S_OK; 00205 } Generated on Sun May 27 2012 04:24:48 for ReactOS by
1.7.6.1
|