Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenclassinfo.c
Go to the documentation of this file.
00001 /* 00002 * Implementation of IProvideClassInfo interfaces for WebBrowser control 00003 * 00004 * Copyright 2001 John R. Sheets (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 <stdarg.h> 00022 #include <string.h> 00023 00024 #include "windef.h" 00025 #include "winbase.h" 00026 #include "shdocvw.h" 00027 #include "wine/debug.h" 00028 00029 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); 00030 00031 /********************************************************************** 00032 * Implement the IProvideClassInfo2 interface 00033 */ 00034 00035 #define CLASSINFO_THIS(iface) DEFINE_THIS(WebBrowser, ProvideClassInfo, iface) 00036 00037 static HRESULT WINAPI ProvideClassInfo_QueryInterface(IProvideClassInfo2 *iface, 00038 REFIID riid, LPVOID *ppobj) 00039 { 00040 WebBrowser *This = CLASSINFO_THIS(iface); 00041 return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppobj); 00042 } 00043 00044 static ULONG WINAPI ProvideClassInfo_AddRef(IProvideClassInfo2 *iface) 00045 { 00046 WebBrowser *This = CLASSINFO_THIS(iface); 00047 return IWebBrowser_AddRef(WEBBROWSER(This)); 00048 } 00049 00050 static ULONG WINAPI ProvideClassInfo_Release(IProvideClassInfo2 *iface) 00051 { 00052 WebBrowser *This = CLASSINFO_THIS(iface); 00053 return IWebBrowser_Release(WEBBROWSER(This)); 00054 } 00055 00056 static HRESULT WINAPI ProvideClassInfo_GetClassInfo(IProvideClassInfo2 *iface, LPTYPEINFO *ppTI) 00057 { 00058 WebBrowser *This = CLASSINFO_THIS(iface); 00059 FIXME("(%p)->(%p)\n", This, ppTI); 00060 return E_NOTIMPL; 00061 } 00062 00063 static HRESULT WINAPI ProvideClassInfo_GetGUID(IProvideClassInfo2 *iface, 00064 DWORD dwGuidKind, GUID *pGUID) 00065 { 00066 WebBrowser *This = CLASSINFO_THIS(iface); 00067 00068 TRACE("(%p)->(%d %p)\n", This, dwGuidKind, pGUID); 00069 00070 if(!pGUID) 00071 return E_POINTER; 00072 00073 if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID) { 00074 WARN("Wrong GUID type: %d\n", dwGuidKind); 00075 *pGUID = IID_NULL; 00076 return E_FAIL; 00077 } 00078 00079 memcpy(pGUID, This->version == 1 ? &DIID_DWebBrowserEvents : &DIID_DWebBrowserEvents2, 00080 sizeof(GUID)); 00081 return S_OK; 00082 } 00083 00084 #undef CLASSINFO_THIS 00085 00086 static const IProvideClassInfo2Vtbl ProvideClassInfoVtbl = 00087 { 00088 ProvideClassInfo_QueryInterface, 00089 ProvideClassInfo_AddRef, 00090 ProvideClassInfo_Release, 00091 ProvideClassInfo_GetClassInfo, 00092 ProvideClassInfo_GetGUID 00093 }; 00094 00095 void WebBrowser_ClassInfo_Init(WebBrowser *This) 00096 { 00097 This->lpProvideClassInfoVtbl = &ProvideClassInfoVtbl; 00098 } Generated on Sun May 27 2012 04:26:13 for ReactOS by
1.7.6.1
|