Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygeninstaller.c
Go to the documentation of this file.
00001 /* 00002 * IUpdateInstaller implementation 00003 * 00004 * Copyright 2008 Hans Leidekker 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 #define COBJMACROS 00022 00023 #include "config.h" 00024 #include <stdarg.h> 00025 00026 #include "windef.h" 00027 #include "winbase.h" 00028 #include "winuser.h" 00029 #include "ole2.h" 00030 #include "wuapi.h" 00031 00032 #include "wine/debug.h" 00033 00034 WINE_DEFAULT_DEBUG_CHANNEL(wuapi); 00035 00036 typedef struct _update_installer 00037 { 00038 const struct IUpdateInstallerVtbl *vtbl; 00039 LONG refs; 00040 } update_installer; 00041 00042 static inline update_installer *impl_from_IUpdateInstaller( IUpdateInstaller *iface ) 00043 { 00044 return (update_installer *)((char *)iface - FIELD_OFFSET( update_installer, vtbl )); 00045 } 00046 00047 static ULONG WINAPI update_installer_AddRef( 00048 IUpdateInstaller *iface ) 00049 { 00050 update_installer *update_installer = impl_from_IUpdateInstaller( iface ); 00051 return InterlockedIncrement( &update_installer->refs ); 00052 } 00053 00054 static ULONG WINAPI update_installer_Release( 00055 IUpdateInstaller *iface ) 00056 { 00057 update_installer *update_installer = impl_from_IUpdateInstaller( iface ); 00058 LONG refs = InterlockedDecrement( &update_installer->refs ); 00059 if (!refs) 00060 { 00061 TRACE("destroying %p\n", update_installer); 00062 HeapFree( GetProcessHeap(), 0, update_installer ); 00063 } 00064 return refs; 00065 } 00066 00067 static HRESULT WINAPI update_installer_QueryInterface( 00068 IUpdateInstaller *iface, 00069 REFIID riid, 00070 void **ppvObject ) 00071 { 00072 update_installer *This = impl_from_IUpdateInstaller( iface ); 00073 00074 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject ); 00075 00076 if ( IsEqualGUID( riid, &IID_IUpdateInstaller ) || 00077 IsEqualGUID( riid, &IID_IDispatch ) || 00078 IsEqualGUID( riid, &IID_IUnknown ) ) 00079 { 00080 *ppvObject = iface; 00081 } 00082 else 00083 { 00084 FIXME("interface %s not implemented\n", debugstr_guid(riid)); 00085 return E_NOINTERFACE; 00086 } 00087 IUpdateInstaller_AddRef( iface ); 00088 return S_OK; 00089 } 00090 00091 static HRESULT WINAPI update_installer_GetTypeInfoCount( 00092 IUpdateInstaller *iface, 00093 UINT *pctinfo ) 00094 { 00095 FIXME("\n"); 00096 return E_NOTIMPL; 00097 } 00098 00099 static HRESULT WINAPI update_installer_GetTypeInfo( 00100 IUpdateInstaller *iface, 00101 UINT iTInfo, 00102 LCID lcid, 00103 ITypeInfo **ppTInfo ) 00104 { 00105 FIXME("\n"); 00106 return E_NOTIMPL; 00107 } 00108 00109 static HRESULT WINAPI update_installer_GetIDsOfNames( 00110 IUpdateInstaller *iface, 00111 REFIID riid, 00112 LPOLESTR *rgszNames, 00113 UINT cNames, 00114 LCID lcid, 00115 DISPID *rgDispId ) 00116 { 00117 FIXME("\n"); 00118 return E_NOTIMPL; 00119 } 00120 00121 static HRESULT WINAPI update_installer_Invoke( 00122 IUpdateInstaller *iface, 00123 DISPID dispIdMember, 00124 REFIID riid, 00125 LCID lcid, 00126 WORD wFlags, 00127 DISPPARAMS *pDispParams, 00128 VARIANT *pVarResult, 00129 EXCEPINFO *pExcepInfo, 00130 UINT *puArgErr ) 00131 { 00132 FIXME("\n"); 00133 return E_NOTIMPL; 00134 } 00135 00136 static HRESULT WINAPI update_installer_get_ClientApplicationID( 00137 IUpdateInstaller *This, 00138 BSTR *retval ) 00139 { 00140 FIXME("\n"); 00141 return E_NOTIMPL; 00142 } 00143 00144 static HRESULT WINAPI update_installer_put_ClientApplicationID( 00145 IUpdateInstaller *This, 00146 BSTR value ) 00147 { 00148 FIXME("%p, %s\n", This, debugstr_w(value)); 00149 return E_NOTIMPL; 00150 } 00151 00152 static HRESULT WINAPI update_installer_get_IsForced( 00153 IUpdateInstaller *This, 00154 VARIANT_BOOL *retval ) 00155 { 00156 FIXME("\n"); 00157 return E_NOTIMPL; 00158 } 00159 00160 static HRESULT WINAPI update_installer_put_IsForced( 00161 IUpdateInstaller *This, 00162 VARIANT_BOOL value ) 00163 { 00164 FIXME("\n"); 00165 return E_NOTIMPL; 00166 } 00167 00168 static HRESULT WINAPI update_installer_get_ParentHwnd( 00169 IUpdateInstaller *This, 00170 HWND *retval ) 00171 { 00172 FIXME("\n"); 00173 return E_NOTIMPL; 00174 } 00175 00176 static HRESULT WINAPI update_installer_put_ParentHwnd( 00177 IUpdateInstaller *This, 00178 HWND value ) 00179 { 00180 FIXME("\n"); 00181 return E_NOTIMPL; 00182 } 00183 00184 static HRESULT WINAPI update_installer_put_ParentWindow( 00185 IUpdateInstaller *This, 00186 IUnknown *value ) 00187 { 00188 FIXME("\n"); 00189 return E_NOTIMPL; 00190 } 00191 00192 static HRESULT WINAPI update_installer_get_ParentWindow( 00193 IUpdateInstaller *This, 00194 IUnknown **retval ) 00195 { 00196 FIXME("\n"); 00197 return E_NOTIMPL; 00198 } 00199 00200 static HRESULT WINAPI update_installer_get_Updates( 00201 IUpdateInstaller *This, 00202 IUpdateCollection **retval ) 00203 { 00204 FIXME("\n"); 00205 return E_NOTIMPL; 00206 } 00207 00208 static HRESULT WINAPI update_installer_put_Updates( 00209 IUpdateInstaller *This, 00210 IUpdateCollection *value ) 00211 { 00212 FIXME("\n"); 00213 return E_NOTIMPL; 00214 } 00215 00216 static const struct IUpdateInstallerVtbl update_installer_vtbl = 00217 { 00218 update_installer_QueryInterface, 00219 update_installer_AddRef, 00220 update_installer_Release, 00221 update_installer_GetTypeInfoCount, 00222 update_installer_GetTypeInfo, 00223 update_installer_GetIDsOfNames, 00224 update_installer_Invoke, 00225 update_installer_get_ClientApplicationID, 00226 update_installer_put_ClientApplicationID, 00227 update_installer_get_IsForced, 00228 update_installer_put_IsForced, 00229 update_installer_get_ParentHwnd, 00230 update_installer_put_ParentHwnd, 00231 update_installer_put_ParentWindow, 00232 update_installer_get_ParentWindow, 00233 update_installer_get_Updates, 00234 update_installer_put_Updates, 00235 }; 00236 00237 HRESULT UpdateInstaller_create( IUnknown *pUnkOuter, LPVOID *ppObj ) 00238 { 00239 update_installer *installer; 00240 00241 TRACE("(%p,%p)\n", pUnkOuter, ppObj); 00242 00243 installer = HeapAlloc( GetProcessHeap(), 0, sizeof(*installer) ); 00244 if (!installer) return E_OUTOFMEMORY; 00245 00246 installer->vtbl = &update_installer_vtbl; 00247 installer->refs = 1; 00248 00249 *ppObj = &installer->vtbl; 00250 00251 TRACE("returning iface %p\n", *ppObj); 00252 return S_OK; 00253 } Generated on Sat May 26 2012 04:25:41 for ReactOS by
1.7.6.1
|