Make IQuickActivate interface heap based.

This commit is contained in:
Jacek Caban 2005-09-09 10:05:40 +00:00 committed by Alexandre Julliard
parent 4e8ec876f0
commit 5cd9c3f625
3 changed files with 44 additions and 54 deletions

View File

@ -1,5 +1,5 @@
/*
* Implementation of miscellaneous interfaces for IE Web Browser control:
* Implementation of miscellaneous interfaces for WebBrowser control:
*
* - IQuickActivate
*
@ -29,66 +29,65 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
* Implement the IQuickActivate interface
*/
static HRESULT WINAPI WBQA_QueryInterface(LPQUICKACTIVATE iface,
REFIID riid, LPVOID *ppobj)
{
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
#define QUICKACT_THIS(iface) DEFINE_THIS(WebBrowser, QuickActivate, iface)
if (ppobj == NULL) return E_POINTER;
return E_NOINTERFACE;
static HRESULT WINAPI QuickActivate_QueryInterface(IQuickActivate *iface,
REFIID riid, LPVOID *ppobj)
{
WebBrowser *This = QUICKACT_THIS(iface);
return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppobj);
}
static ULONG WINAPI WBQA_AddRef(LPQUICKACTIVATE iface)
static ULONG WINAPI QuickActivate_AddRef(IQuickActivate *iface)
{
SHDOCVW_LockModule();
return 2; /* non-heap based object */
WebBrowser *This = QUICKACT_THIS(iface);
return IWebBrowser_AddRef(WEBBROWSER(This));
}
static ULONG WINAPI WBQA_Release(LPQUICKACTIVATE iface)
static ULONG WINAPI QuickActivate_Release(IQuickActivate *iface)
{
SHDOCVW_UnlockModule();
return 1; /* non-heap based object */
WebBrowser *This = QUICKACT_THIS(iface);
return IWebBrowser_Release(WEBBROWSER(This));
}
/* Alternative interface for quicker, easier activation of a control. */
static HRESULT WINAPI WBQA_QuickActivate(LPQUICKACTIVATE iface,
QACONTAINER *pQaContainer,
QACONTROL *pQaControl)
static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface,
QACONTAINER *pQaContainer, QACONTROL *pQaControl)
{
FIXME("stub: QACONTAINER = %p, QACONTROL = %p\n", pQaContainer, pQaControl);
return S_OK;
WebBrowser *This = QUICKACT_THIS(iface);
FIXME("(%p)->(%p %p)\n", This, pQaContainer, pQaControl);
return E_NOTIMPL;
}
static HRESULT WINAPI WBQA_SetContentExtent(LPQUICKACTIVATE iface, LPSIZEL pSizel)
static HRESULT WINAPI QuickActivate_SetContentExtent(IQuickActivate *iface, LPSIZEL pSizel)
{
FIXME("stub: LPSIZEL = %p\n", pSizel);
return E_NOINTERFACE;
WebBrowser *This = QUICKACT_THIS(iface);
FIXME("(%p)->(%p)\n", This, pSizel);
return E_NOTIMPL;
}
static HRESULT WINAPI WBQA_GetContentExtent(LPQUICKACTIVATE iface, LPSIZEL pSizel)
static HRESULT WINAPI QuickActivate_GetContentExtent(IQuickActivate *iface, LPSIZEL pSizel)
{
FIXME("stub: LPSIZEL = %p\n", pSizel);
return E_NOINTERFACE;
WebBrowser *This = QUICKACT_THIS(iface);
FIXME("(%p)->(%p)\n", This, pSizel);
return E_NOTIMPL;
}
/**********************************************************************
* IQuickActivate virtual function table for IE Web Browser component
*/
#undef QUICKACT_THIS
static const IQuickActivateVtbl WBQA_Vtbl =
static const IQuickActivateVtbl QuickActivateVtbl =
{
WBQA_QueryInterface,
WBQA_AddRef,
WBQA_Release,
WBQA_QuickActivate,
WBQA_SetContentExtent,
WBQA_GetContentExtent
QuickActivate_QueryInterface,
QuickActivate_AddRef,
QuickActivate_Release,
QuickActivate_QuickActivate,
QuickActivate_SetContentExtent,
QuickActivate_GetContentExtent
};
IQuickActivateImpl SHDOCVW_QuickActivate = {&WBQA_Vtbl};
void WebBrowser_Misc_Init(WebBrowser *This)
{
This->lpQuickActivateVtbl = &QuickActivateVtbl;
}
/**********************************************************************
* OpenURL (SHDOCVW.@)

View File

@ -60,6 +60,7 @@ typedef struct {
const IPersistStorageVtbl *lpPersistStorageVtbl;
const IPersistStreamInitVtbl *lpPersistStreamInitVtbl;
const IProvideClassInfo2Vtbl *lpProvideClassInfoVtbl;
const IQuickActivateVtbl *lpQuickActivateVtbl;
LONG ref;
} WebBrowser;
@ -71,26 +72,15 @@ typedef struct {
#define PERSTORAGE(x) ((IPersistStorage*) &(x)->lpPersistStorageVtbl)
#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
#define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
#define QUICKACT(x) ((IQuickActivate*) &(x)->lpQuickActivateVtbl)
void WebBrowser_OleObject_Init(WebBrowser*);
void WebBrowser_Persist_Init(WebBrowser*);
void WebBrowser_ClassInfo_Init(WebBrowser*);
void WebBrowser_Misc_Init(WebBrowser*);
HRESULT WebBrowser_Create(IUnknown*,REFIID,void**);
/**********************************************************************
* IQuickActivate declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
const IQuickActivateVtbl *lpVtbl;
LONG ref;
} IQuickActivateImpl;
extern IQuickActivateImpl SHDOCVW_QuickActivate;
/**********************************************************************
* IConnectionPointContainer declaration for SHDOCVW.DLL
*/

View File

@ -75,8 +75,8 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser *iface, REFIID riid,
TRACE("(%p)->(IID_IProvideClassInfo2 %p)\n", This, ppv);
*ppv = CLASSINFO(This);
}else if(IsEqualGUID (&IID_IQuickActivate, riid)) {
FIXME("(%p)->(IID_IQuickActivate %p)\n", This, ppv);
*ppv = &SHDOCVW_QuickActivate;
TRACE("(%p)->(IID_IQuickActivate %p)\n", This, ppv);
*ppv = QUICKACT(This);
}else if(IsEqualGUID (&IID_IConnectionPointContainer, riid)) {
FIXME("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
*ppv = &SHDOCVW_ConnectionPointContainer;
@ -387,6 +387,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
WebBrowser_OleObject_Init(ret);
WebBrowser_Persist_Init(ret);
WebBrowser_ClassInfo_Init(ret);
WebBrowser_Misc_Init(ret);
hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv);
if(SUCCEEDED(hres)) {