parent
7a843c668e
commit
755e2bac6c
|
@ -25,7 +25,7 @@
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Implement the IWebBrowser class factory
|
* Implement the WebBrowser class factory
|
||||||
*
|
*
|
||||||
* (Based on implementation in ddraw/main.c)
|
* (Based on implementation in ddraw/main.c)
|
||||||
*/
|
*/
|
||||||
|
@ -36,10 +36,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||||
static HRESULT WINAPI WBCF_QueryInterface(LPCLASSFACTORY iface,
|
static HRESULT WINAPI WBCF_QueryInterface(LPCLASSFACTORY iface,
|
||||||
REFIID riid, LPVOID *ppobj)
|
REFIID riid, LPVOID *ppobj)
|
||||||
{
|
{
|
||||||
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
TRACE("(%s %p)\n", debugstr_guid(riid), ppobj);
|
||||||
|
|
||||||
if (ppobj == NULL) return E_POINTER;
|
if (!ppobj)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) {
|
||||||
|
*ppobj = iface;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
WARN("Not supported interface %s\n", debugstr_guid(riid));
|
||||||
|
|
||||||
|
*ppobj = NULL;
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,25 +78,7 @@ static ULONG WINAPI WBCF_Release(LPCLASSFACTORY iface)
|
||||||
static HRESULT WINAPI WBCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter,
|
static HRESULT WINAPI WBCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter,
|
||||||
REFIID riid, LPVOID *ppobj)
|
REFIID riid, LPVOID *ppobj)
|
||||||
{
|
{
|
||||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
return WebBrowser_Create(pOuter, riid, ppobj);
|
||||||
|
|
||||||
/* Don't support aggregation (yet?) */
|
|
||||||
if (pOuter)
|
|
||||||
{
|
|
||||||
TRACE ("Failed attempt to aggregate IWebBrowser\n");
|
|
||||||
return CLASS_E_NOAGGREGATION;
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACE("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
|
|
||||||
|
|
||||||
if ((IsEqualGUID (&IID_IOleObject, riid)))
|
|
||||||
{
|
|
||||||
TRACE ("Instantiating IOleObject component\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_OleObject;
|
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
return CLASS_E_CLASSNOTAVAILABLE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
/*
|
/*
|
||||||
* Implementation of IOleObject interfaces for IE Web Browser
|
* Implementation of IOleObject interfaces for WebBrowser control
|
||||||
*
|
*
|
||||||
* - IOleObject
|
* - IOleObject
|
||||||
* - IOleInPlaceObject
|
* - IOleInPlaceObject
|
||||||
* - IOleControl
|
* - IOleControl
|
||||||
*
|
*
|
||||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||||
|
* Copyright 2005 Jacek Caban
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -25,257 +26,99 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "shdocvw.h"
|
#include "shdocvw.h"
|
||||||
#include "ole2.h"
|
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* IOleControl declaration for SHDOCVW.DLL
|
* Implement the IOleObject interface for the WebBrowser control
|
||||||
*/
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
/* IUnknown fields */
|
|
||||||
const IOleControlVtbl *lpVtbl;
|
|
||||||
DWORD ref;
|
|
||||||
} IOleControlImpl;
|
|
||||||
|
|
||||||
static IOleControlImpl SHDOCVW_OleControl;
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* IOleInPlaceObject declaration for SHDOCVW.DLL
|
|
||||||
*/
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
/* IUnknown fields */
|
|
||||||
const IOleInPlaceObjectVtbl *lpVtbl;
|
|
||||||
DWORD ref;
|
|
||||||
} IOleInPlaceObjectImpl;
|
|
||||||
|
|
||||||
static IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject;
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* Implement the IOleObject interface for the web browser component
|
|
||||||
*
|
|
||||||
* Based on DefaultHandler code in dlls/ole32/defaulthandler.c.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static ULONG WINAPI WBOOBJ_AddRef(LPOLEOBJECT iface);
|
#define OLEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleObject, iface)
|
||||||
static ULONG WINAPI WBOOBJ_Release(LPOLEOBJECT iface);
|
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
|
||||||
* WBOOBJ_QueryInterface (IUnknown)
|
|
||||||
*
|
|
||||||
* Interfaces we need to (at least pretend to) retrieve:
|
|
||||||
*
|
|
||||||
* a6bc3ac0-dbaa-11ce-9de3-00aa004bb851 IID_IProvideClassInfo2
|
|
||||||
* b196b283-bab4-101a-b69c-00aa00341d07 IID_IProvideClassInfo
|
|
||||||
* cf51ed10-62fe-11cf-bf86-00a0c9034836 IID_IQuickActivate
|
|
||||||
* 7fd52380-4e07-101b-ae2d-08002b2ec713 IID_IPersistStreamInit
|
|
||||||
* 0000010a-0000-0000-c000-000000000046 IID_IPersistStorage
|
|
||||||
* b196b284-bab4-101a-b69c-00aa00341d07 IID_IConnectionPointContainer
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_QueryInterface(LPOLEOBJECT iface,
|
|
||||||
REFIID riid, void** ppobj)
|
|
||||||
{
|
{
|
||||||
IOleObjectImpl *This = (IOleObjectImpl *)iface;
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
|
return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppv);
|
||||||
/*
|
|
||||||
* Perform a sanity check on the parameters.
|
|
||||||
*/
|
|
||||||
if ((This == NULL) || (ppobj == NULL) )
|
|
||||||
return E_INVALIDARG;
|
|
||||||
|
|
||||||
if (IsEqualGUID (&IID_IPersistStorage, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IPersistStorage interface\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_PersistStorage;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else if (IsEqualGUID (&IID_IPersistStreamInit, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IPersistStreamInit interface\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_PersistStreamInit;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else if (IsEqualGUID (&IID_IProvideClassInfo, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IProvideClassInfo interface\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_ProvideClassInfo;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else if (IsEqualGUID (&IID_IProvideClassInfo2, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IProvideClassInfo2 interface %p\n",
|
|
||||||
&SHDOCVW_ProvideClassInfo2);
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_ProvideClassInfo2;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else if (IsEqualGUID (&IID_IQuickActivate, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IQuickActivate interface\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_QuickActivate;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else if (IsEqualGUID (&IID_IConnectionPointContainer, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IConnectionPointContainer interface\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_ConnectionPointContainer;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else if (IsEqualGUID (&IID_IOleInPlaceObject, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IOleInPlaceObject interface\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_OleInPlaceObject;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else if (IsEqualGUID (&IID_IOleControl, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IOleControl interface\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_OleControl;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else if (IsEqualGUID (&IID_IWebBrowser, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IWebBrowser interface\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_WebBrowser;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else if (IsEqualGUID (&IID_IDispatch, riid))
|
|
||||||
{
|
|
||||||
TRACE("Returning IID_IDispatch interface\n");
|
|
||||||
*ppobj = (LPVOID)&SHDOCVW_WebBrowser;
|
|
||||||
WBOOBJ_AddRef (iface);
|
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE ("Failed to find iid = %s\n", debugstr_guid(riid));
|
static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
|
||||||
|
|
||||||
return E_NOINTERFACE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* WBOOBJ_AddRef (IUnknown)
|
|
||||||
*/
|
|
||||||
static ULONG WINAPI WBOOBJ_AddRef(LPOLEOBJECT iface)
|
|
||||||
{
|
{
|
||||||
SHDOCVW_LockModule();
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
|
return IWebBrowser_AddRef(WEBBROWSER(This));
|
||||||
return 2; /* non-heap based object */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static ULONG WINAPI OleObject_Release(IOleObject *iface)
|
||||||
* WBOOBJ_Release (IUnknown)
|
|
||||||
*/
|
|
||||||
static ULONG WINAPI WBOOBJ_Release(LPOLEOBJECT iface)
|
|
||||||
{
|
{
|
||||||
SHDOCVW_UnlockModule();
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
|
return IWebBrowser_Release(WEBBROWSER(This));
|
||||||
return 1; /* non-heap based object */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE pClientSite)
|
||||||
* WBOOBJ_SetClientSite (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_SetClientSite(LPOLEOBJECT iface,
|
|
||||||
LPOLECLIENTSITE pClientSite)
|
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %p)\n", iface, pClientSite);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, pClientSite);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, LPOLECLIENTSITE *ppClientSite)
|
||||||
* WBOOBJ_GetClientSite (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_GetClientSite(LPOLEOBJECT iface,
|
|
||||||
LPOLECLIENTSITE* ppClientSite)
|
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p)\n", *ppClientSite);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, ppClientSite);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp,
|
||||||
* WBOOBJ_SetHostNames (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_SetHostNames(LPOLEOBJECT iface, LPCOLESTR szContainerApp,
|
|
||||||
LPCOLESTR szContainerObj)
|
LPCOLESTR szContainerObj)
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %s, %s)\n", iface, debugstr_w(szContainerApp),
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
debugstr_w(szContainerObj));
|
FIXME("(%p)->(%s, %s)\n", This, debugstr_w(szContainerApp), debugstr_w(szContainerObj));
|
||||||
return S_OK;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
|
||||||
* WBOOBJ_Close (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_Close(LPOLEOBJECT iface, DWORD dwSaveOption)
|
|
||||||
{
|
{
|
||||||
FIXME("stub: ()\n");
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%ld)\n", This, dwSaveOption);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker* pmk)
|
||||||
* WBOOBJ_SetMoniker (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_SetMoniker(LPOLEOBJECT iface,
|
|
||||||
DWORD dwWhichMoniker, IMoniker* pmk)
|
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %ld, %p)\n", iface, dwWhichMoniker, pmk);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%ld, %p)\n", This, dwWhichMoniker, pmk);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign,
|
||||||
* WBOOBJ_GetMoniker (IOleObject)
|
|
||||||
*
|
|
||||||
* Delegate this request to the client site if we have one.
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_GetMoniker(LPOLEOBJECT iface, DWORD dwAssign,
|
|
||||||
DWORD dwWhichMoniker, LPMONIKER *ppmk)
|
DWORD dwWhichMoniker, LPMONIKER *ppmk)
|
||||||
{
|
{
|
||||||
FIXME("stub (%p, %ld, %ld, %p)\n", iface, dwAssign, dwWhichMoniker, ppmk);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return E_FAIL;
|
FIXME("(%p)->(%ld, %ld, %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, LPDATAOBJECT pDataObject,
|
||||||
* WBOOBJ_InitFromData (IOleObject)
|
|
||||||
*
|
|
||||||
* This method is meaningless if the server is not running
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_InitFromData(LPOLEOBJECT iface, LPDATAOBJECT pDataObject,
|
|
||||||
BOOL fCreation, DWORD dwReserved)
|
BOOL fCreation, DWORD dwReserved)
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %p, %d, %ld)\n", iface, pDataObject, fCreation, dwReserved);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return OLE_E_NOTRUNNING;
|
FIXME("(%p)->(%p, %d, %ld)\n", This, pDataObject, fCreation, dwReserved);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwReserved,
|
||||||
* WBOOBJ_GetClipboardData (IOleObject)
|
|
||||||
*
|
|
||||||
* This method is meaningless if the server is not running
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_GetClipboardData(LPOLEOBJECT iface, DWORD dwReserved,
|
|
||||||
LPDATAOBJECT *ppDataObject)
|
LPDATAOBJECT *ppDataObject)
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %ld, %p)\n", iface, dwReserved, ppDataObject);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return OLE_E_NOTRUNNING;
|
FIXME("(%p)->(%ld, %p)\n", This, dwReserved, ppDataObject);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tagMSG* lpmsg,
|
||||||
* WBOOBJ_DoVerb (IOleObject)
|
LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_DoVerb(LPOLEOBJECT iface, LONG iVerb, struct tagMSG* lpmsg,
|
|
||||||
LPOLECLIENTSITE pActiveSite, LONG lindex,
|
|
||||||
HWND hwndParent, LPCRECT lprcPosRect)
|
|
||||||
{
|
{
|
||||||
FIXME(": stub iVerb = %ld\n", iVerb);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
|
FIXME("(%p)->(%ld %p %p %ld %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent,
|
||||||
|
lprcPosRect);
|
||||||
switch (iVerb)
|
switch (iVerb)
|
||||||
{
|
{
|
||||||
case OLEIVERB_INPLACEACTIVATE:
|
case OLEIVERB_INPLACEACTIVATE:
|
||||||
|
@ -286,126 +129,87 @@ static HRESULT WINAPI WBOOBJ_DoVerb(LPOLEOBJECT iface, LONG iVerb, struct tagMSG
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* WBOOBJ_EnumVerbs (IOleObject)
|
|
||||||
*
|
|
||||||
* Delegate to OleRegEnumVerbs.
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_EnumVerbs(LPOLEOBJECT iface,
|
|
||||||
IEnumOLEVERB** ppEnumOleVerb)
|
|
||||||
{
|
|
||||||
TRACE("(%p, %p)\n", iface, ppEnumOleVerb);
|
|
||||||
|
|
||||||
return OleRegEnumVerbs(&CLSID_WebBrowser, ppEnumOleVerb);
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* WBOOBJ_EnumVerbs (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_Update(LPOLEOBJECT iface)
|
|
||||||
{
|
|
||||||
FIXME(": Stub\n");
|
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
|
||||||
* WBOOBJ_IsUpToDate (IOleObject)
|
|
||||||
*
|
|
||||||
* This method is meaningless if the server is not running
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_IsUpToDate(LPOLEOBJECT iface)
|
|
||||||
{
|
{
|
||||||
FIXME("(%p)\n", iface);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return OLE_E_NOTRUNNING;
|
TRACE("(%p)->(%p)\n", This, ppEnumOleVerb);
|
||||||
|
return OleRegEnumVerbs(&CLSID_WebBrowser, ppEnumOleVerb);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_Update(IOleObject *iface)
|
||||||
* WBOOBJ_GetUserClassID (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_GetUserClassID(LPOLEOBJECT iface, CLSID* pClsid)
|
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %p)\n", iface, pClsid);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)\n", This);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
|
||||||
* WBOOBJ_GetUserType (IOleObject)
|
{
|
||||||
*
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
* Delegate to OleRegGetUserType.
|
FIXME("(%p)\n", This);
|
||||||
*/
|
return E_NOTIMPL;
|
||||||
static HRESULT WINAPI WBOOBJ_GetUserType(LPOLEOBJECT iface, DWORD dwFormOfType,
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID* pClsid)
|
||||||
|
{
|
||||||
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
|
FIXME("(%p)->(%p)\n", This, pClsid);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType,
|
||||||
LPOLESTR* pszUserType)
|
LPOLESTR* pszUserType)
|
||||||
{
|
{
|
||||||
TRACE("(%p, %ld, %p)\n", iface, dwFormOfType, pszUserType);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
|
TRACE("(%p, %ld, %p)\n", This, dwFormOfType, pszUserType);
|
||||||
return OleRegGetUserType(&CLSID_WebBrowser, dwFormOfType, pszUserType);
|
return OleRegGetUserType(&CLSID_WebBrowser, dwFormOfType, pszUserType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
|
||||||
* WBOOBJ_SetExtent (IOleObject)
|
|
||||||
*
|
|
||||||
* This method is meaningless if the server is not running
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_SetExtent(LPOLEOBJECT iface, DWORD dwDrawAspect,
|
|
||||||
SIZEL* psizel)
|
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %lx, (%ld x %ld))\n", iface, dwDrawAspect,
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
psizel->cx, psizel->cy);
|
FIXME("(%p)->(%lx %p)\n", This, dwDrawAspect, psizel);
|
||||||
return OLE_E_NOTRUNNING;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
|
||||||
* WBOOBJ_GetExtent (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_GetExtent(LPOLEOBJECT iface, DWORD dwDrawAspect,
|
|
||||||
SIZEL* psizel)
|
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %lx, %p)\n", iface, dwDrawAspect, psizel);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%lx, %p)\n", This, dwDrawAspect, psizel);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink,
|
||||||
* WBOOBJ_Advise (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_Advise(LPOLEOBJECT iface, IAdviseSink* pAdvSink,
|
|
||||||
DWORD* pdwConnection)
|
DWORD* pdwConnection)
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %p, %p)\n", iface, pAdvSink, pdwConnection);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
|
FIXME("(%p)->(%p, %p)\n", This, pAdvSink, pdwConnection);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
|
||||||
|
{
|
||||||
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
|
FIXME("(%p)->(%ld)\n", This, dwConnection);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
|
||||||
|
{
|
||||||
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
|
FIXME("(%p)->(%p)\n", This, ppenumAdvise);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
|
||||||
* WBOOBJ_Unadvise (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_Unadvise(LPOLEOBJECT iface, DWORD dwConnection)
|
|
||||||
{
|
|
||||||
FIXME("stub: (%p, %ld)\n", iface, dwConnection);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* WBOOBJ_EnumAdvise (IOleObject)
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_EnumAdvise(LPOLEOBJECT iface, IEnumSTATDATA** ppenumAdvise)
|
|
||||||
{
|
|
||||||
FIXME("stub: (%p, %p)\n", iface, ppenumAdvise);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* WBOOBJ_GetMiscStatus (IOleObject)
|
|
||||||
*
|
|
||||||
* Delegate to OleRegGetMiscStatus.
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_GetMiscStatus(LPOLEOBJECT iface, DWORD dwAspect,
|
|
||||||
DWORD* pdwStatus)
|
|
||||||
{
|
{
|
||||||
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
TRACE("(%p, %lx, %p)\n", iface, dwAspect, pdwStatus);
|
TRACE("(%p)->(%lx, %p)\n", This, dwAspect, pdwStatus);
|
||||||
|
|
||||||
hres = OleRegGetMiscStatus(&CLSID_WebBrowser, dwAspect, pdwStatus);
|
hres = OleRegGetMiscStatus(&CLSID_WebBrowser, dwAspect, pdwStatus);
|
||||||
|
|
||||||
|
@ -415,53 +219,43 @@ static HRESULT WINAPI WBOOBJ_GetMiscStatus(LPOLEOBJECT iface, DWORD dwAspect,
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE* pLogpal)
|
||||||
* WBOOBJ_SetColorScheme (IOleObject)
|
|
||||||
*
|
|
||||||
* This method is meaningless if the server is not running
|
|
||||||
*/
|
|
||||||
static HRESULT WINAPI WBOOBJ_SetColorScheme(LPOLEOBJECT iface,
|
|
||||||
struct tagLOGPALETTE* pLogpal)
|
|
||||||
{
|
{
|
||||||
FIXME("stub: (%p, %p))\n", iface, pLogpal);
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
||||||
return OLE_E_NOTRUNNING;
|
FIXME("(%p)->(%p)\n", This, pLogpal);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
#undef OLEOBJ_THIS
|
||||||
* IOleObject virtual function table for IE Web Browser component
|
|
||||||
*/
|
|
||||||
|
|
||||||
static const IOleObjectVtbl WBOOBJ_Vtbl =
|
static const IOleObjectVtbl OleObjectVtbl =
|
||||||
{
|
{
|
||||||
WBOOBJ_QueryInterface,
|
OleObject_QueryInterface,
|
||||||
WBOOBJ_AddRef,
|
OleObject_AddRef,
|
||||||
WBOOBJ_Release,
|
OleObject_Release,
|
||||||
WBOOBJ_SetClientSite,
|
OleObject_SetClientSite,
|
||||||
WBOOBJ_GetClientSite,
|
OleObject_GetClientSite,
|
||||||
WBOOBJ_SetHostNames,
|
OleObject_SetHostNames,
|
||||||
WBOOBJ_Close,
|
OleObject_Close,
|
||||||
WBOOBJ_SetMoniker,
|
OleObject_SetMoniker,
|
||||||
WBOOBJ_GetMoniker,
|
OleObject_GetMoniker,
|
||||||
WBOOBJ_InitFromData,
|
OleObject_InitFromData,
|
||||||
WBOOBJ_GetClipboardData,
|
OleObject_GetClipboardData,
|
||||||
WBOOBJ_DoVerb,
|
OleObject_DoVerb,
|
||||||
WBOOBJ_EnumVerbs,
|
OleObject_EnumVerbs,
|
||||||
WBOOBJ_Update,
|
OleObject_Update,
|
||||||
WBOOBJ_IsUpToDate,
|
OleObject_IsUpToDate,
|
||||||
WBOOBJ_GetUserClassID,
|
OleObject_GetUserClassID,
|
||||||
WBOOBJ_GetUserType,
|
OleObject_GetUserType,
|
||||||
WBOOBJ_SetExtent,
|
OleObject_SetExtent,
|
||||||
WBOOBJ_GetExtent,
|
OleObject_GetExtent,
|
||||||
WBOOBJ_Advise,
|
OleObject_Advise,
|
||||||
WBOOBJ_Unadvise,
|
OleObject_Unadvise,
|
||||||
WBOOBJ_EnumAdvise,
|
OleObject_EnumAdvise,
|
||||||
WBOOBJ_GetMiscStatus,
|
OleObject_GetMiscStatus,
|
||||||
WBOOBJ_SetColorScheme
|
OleObject_SetColorScheme
|
||||||
};
|
};
|
||||||
|
|
||||||
IOleObjectImpl SHDOCVW_OleObject = {&WBOOBJ_Vtbl};
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Implement the IOleInPlaceObject interface
|
* Implement the IOleInPlaceObject interface
|
||||||
*/
|
*/
|
||||||
|
@ -559,7 +353,7 @@ static const IOleInPlaceObjectVtbl WBOIPO_Vtbl =
|
||||||
WBOIPO_ReactivateAndUndo
|
WBOIPO_ReactivateAndUndo
|
||||||
};
|
};
|
||||||
|
|
||||||
static IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject = {&WBOIPO_Vtbl};
|
IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject = {&WBOIPO_Vtbl};
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
@ -629,4 +423,9 @@ static const IOleControlVtbl WBOC_Vtbl =
|
||||||
WBOC_FreezeEvents
|
WBOC_FreezeEvents
|
||||||
};
|
};
|
||||||
|
|
||||||
static IOleControlImpl SHDOCVW_OleControl = {&WBOC_Vtbl};
|
IOleControlImpl SHDOCVW_OleControl = {&WBOC_Vtbl};
|
||||||
|
|
||||||
|
void WebBrowser_OleObject_Init(WebBrowser *This)
|
||||||
|
{
|
||||||
|
This->lpOleObjectVtbl = &OleObjectVtbl;
|
||||||
|
}
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
#define __WINE_SHDOCVW_H
|
#define __WINE_SHDOCVW_H
|
||||||
|
|
||||||
#define COM_NO_WINDOWS_H
|
#define COM_NO_WINDOWS_H
|
||||||
/* FIXME: Is there a better way to deal with all these includes? */
|
#define COBJMACROS
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
|
@ -49,29 +50,21 @@ extern IClassFactoryImpl SHDOCVW_ClassFactory;
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* IOleObject declaration for SHDOCVW.DLL
|
* WebBrowser declaration for SHDOCVW.DLL
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
const IWebBrowserVtbl *lpWebBrowserVtbl;
|
||||||
/* IUnknown fields */
|
const IOleObjectVtbl *lpOleObjectVtbl;
|
||||||
const IOleObjectVtbl *lpVtbl;
|
|
||||||
LONG ref;
|
LONG ref;
|
||||||
} IOleObjectImpl;
|
} WebBrowser;
|
||||||
|
|
||||||
extern IOleObjectImpl SHDOCVW_OleObject;
|
#define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowserVtbl)
|
||||||
|
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
|
||||||
|
|
||||||
/**********************************************************************
|
void WebBrowser_OleObject_Init(WebBrowser*);
|
||||||
* IWebBrowser declaration for SHDOCVW.DLL
|
|
||||||
*/
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
/* IUnknown fields */
|
|
||||||
const IWebBrowserVtbl *lpVtbl;
|
|
||||||
LONG ref;
|
|
||||||
} IWebBrowserImpl;
|
|
||||||
|
|
||||||
extern IWebBrowserImpl SHDOCVW_WebBrowser;
|
|
||||||
|
|
||||||
|
HRESULT WebBrowser_Create(IUnknown*,REFIID,void**);
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* IProvideClassInfo declaration for SHDOCVW.DLL
|
* IProvideClassInfo declaration for SHDOCVW.DLL
|
||||||
|
@ -161,6 +154,32 @@ typedef struct
|
||||||
LONG ref;
|
LONG ref;
|
||||||
} IConnectionPointImpl;
|
} IConnectionPointImpl;
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* IOleInPlaceObject declaration for SHDOCVW.DLL
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
/* IUnknown fields */
|
||||||
|
const IOleInPlaceObjectVtbl *lpVtbl;
|
||||||
|
DWORD ref;
|
||||||
|
} IOleInPlaceObjectImpl;
|
||||||
|
|
||||||
|
extern IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject;
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* IOleControl declaration for SHDOCVW.DLL
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
/* IUnknown fields */
|
||||||
|
const IOleControlVtbl *lpVtbl;
|
||||||
|
DWORD ref;
|
||||||
|
} IOleControlImpl;
|
||||||
|
|
||||||
|
extern IOleControlImpl SHDOCVW_OleControl;
|
||||||
|
|
||||||
|
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Dll lifetime tracking declaration for shdocvw.dll
|
* Dll lifetime tracking declaration for shdocvw.dll
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* Implementation of IWebBrowser interface for IE Web Browser control
|
* Implementation of IWebBrowser interface for WebBrowser control
|
||||||
*
|
*
|
||||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||||
|
* Copyright 2005 Jacek Caban
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -27,252 +28,365 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||||
* Implement the IWebBrowser interface
|
* Implement the IWebBrowser interface
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static HRESULT WINAPI WB_QueryInterface(IWebBrowser *iface, REFIID riid, LPVOID *ppobj)
|
#define WEBBROWSER_THIS(iface) DEFINE_THIS(WebBrowser, WebBrowser, iface)
|
||||||
|
|
||||||
|
static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser *iface, REFIID riid, LPVOID *ppv)
|
||||||
{
|
{
|
||||||
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
|
|
||||||
if (ppobj == NULL) return E_POINTER;
|
if (ppv == NULL)
|
||||||
|
return E_POINTER;
|
||||||
|
*ppv = NULL;
|
||||||
|
|
||||||
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||||
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||||
|
*ppv = WEBBROWSER(This);
|
||||||
|
}else if(IsEqualGUID (&IID_IDispatch, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
||||||
|
*ppv = WEBBROWSER(This);
|
||||||
|
}else if(IsEqualGUID(&IID_IWebBrowser, riid)) {
|
||||||
|
TRACE("(%p)->(IID_IWebBrowser %p)\n", This, ppv);
|
||||||
|
*ppv = WEBBROWSER(This);
|
||||||
|
}else if(IsEqualGUID(&IID_IOleObject, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IOleObject %p)\n", This, ppv);
|
||||||
|
*ppv = OLEOBJ(This);
|
||||||
|
}else if(IsEqualGUID (&IID_IPersistStorage, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IPersistStorage %p)\n", This, ppv);
|
||||||
|
*ppv = &SHDOCVW_PersistStorage;
|
||||||
|
}else if(IsEqualGUID (&IID_IPersistStreamInit, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IPersistStreamInit %p)\n", This, ppv);
|
||||||
|
*ppv = &SHDOCVW_PersistStreamInit;
|
||||||
|
}else if(IsEqualGUID (&IID_IProvideClassInfo, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IProvideClassInfo %p)\n", This, ppv);
|
||||||
|
*ppv = &SHDOCVW_ProvideClassInfo;
|
||||||
|
}else if(IsEqualGUID (&IID_IProvideClassInfo2, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IProvideClassInfo2 %p)\n", This, ppv);
|
||||||
|
*ppv = &SHDOCVW_ProvideClassInfo2;
|
||||||
|
}else if(IsEqualGUID (&IID_IQuickActivate, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IQuickActivate %p)\n", This, ppv);
|
||||||
|
*ppv = &SHDOCVW_QuickActivate;
|
||||||
|
}else if(IsEqualGUID (&IID_IConnectionPointContainer, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
|
||||||
|
*ppv = &SHDOCVW_ConnectionPointContainer;
|
||||||
|
}else if(IsEqualGUID (&IID_IOleInPlaceObject, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IOleInPlaceObject %p)\n", This, ppv);
|
||||||
|
*ppv = &SHDOCVW_OleInPlaceObject;
|
||||||
|
}else if(IsEqualGUID (&IID_IOleControl, riid)) {
|
||||||
|
FIXME("(%p)->(IID_IOleControl %p)\n", This, ppv);
|
||||||
|
*ppv = &SHDOCVW_OleControl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(*ppv) {
|
||||||
|
IUnknown_AddRef((IUnknown*)*ppv);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
FIXME("(%p)->(%s %p) interface not supported\n", This, debugstr_guid(riid), ppv);
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI WB_AddRef(IWebBrowser *iface)
|
static ULONG WINAPI WebBrowser_AddRef(IWebBrowser *iface)
|
||||||
{
|
{
|
||||||
SHDOCVW_LockModule();
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
|
LONG ref = InterlockedIncrement(&This->ref);
|
||||||
return 2; /* non-heap based object */
|
TRACE("(%p) ref=%ld\n", This, ref);
|
||||||
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI WB_Release(IWebBrowser *iface)
|
static ULONG WINAPI WebBrowser_Release(IWebBrowser *iface)
|
||||||
{
|
{
|
||||||
SHDOCVW_UnlockModule();
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
|
LONG ref = InterlockedDecrement(&This->ref);
|
||||||
|
|
||||||
return 1; /* non-heap based object */
|
TRACE("(%p) ref=%ld\n", This, ref);
|
||||||
|
|
||||||
|
if(!ref) {
|
||||||
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
|
SHDOCVW_UnlockModule();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IDispatch methods */
|
/* IDispatch methods */
|
||||||
static HRESULT WINAPI WB_GetTypeInfoCount(IWebBrowser *iface, UINT *pctinfo)
|
static HRESULT WINAPI WebBrowser_GetTypeInfoCount(IWebBrowser *iface, UINT *pctinfo)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, pctinfo);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_GetTypeInfo(IWebBrowser *iface, UINT iTInfo, LCID lcid,
|
static HRESULT WINAPI WebBrowser_GetTypeInfo(IWebBrowser *iface, UINT iTInfo, LCID lcid,
|
||||||
LPTYPEINFO *ppTInfo)
|
LPTYPEINFO *ppTInfo)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%d %ld %p)\n", This, iTInfo, lcid, ppTInfo);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_GetIDsOfNames(IWebBrowser *iface, REFIID riid,
|
static HRESULT WINAPI WebBrowser_GetIDsOfNames(IWebBrowser *iface, REFIID riid,
|
||||||
LPOLESTR *rgszNames, UINT cNames,
|
LPOLESTR *rgszNames, UINT cNames,
|
||||||
LCID lcid, DISPID *rgDispId)
|
LCID lcid, DISPID *rgDispId)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%s %p %d %ld %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
||||||
|
lcid, rgDispId);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_Invoke(IWebBrowser *iface, DISPID dispIdMember,
|
static HRESULT WINAPI WebBrowser_Invoke(IWebBrowser *iface, DISPID dispIdMember,
|
||||||
REFIID riid, LCID lcid, WORD wFlags,
|
REFIID riid, LCID lcid, WORD wFlags,
|
||||||
DISPPARAMS *pDispParams, VARIANT *pVarResult,
|
DISPPARAMS *pDispParams, VARIANT *pVarResult,
|
||||||
EXCEPINFO *pExepInfo, UINT *puArgErr)
|
EXCEPINFO *pExepInfo, UINT *puArgErr)
|
||||||
{
|
{
|
||||||
FIXME("stub dispIdMember = %d, IID = %s\n", (int)dispIdMember, debugstr_guid(riid));
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%ld %s %ld %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
|
||||||
|
lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IWebBrowser methods */
|
/* IWebBrowser methods */
|
||||||
static HRESULT WINAPI WB_GoBack(IWebBrowser *iface)
|
static HRESULT WINAPI WebBrowser_GoBack(IWebBrowser *iface)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)\n", This);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_GoForward(IWebBrowser *iface)
|
static HRESULT WINAPI WebBrowser_GoForward(IWebBrowser *iface)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)\n", This);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_GoHome(IWebBrowser *iface)
|
static HRESULT WINAPI WebBrowser_GoHome(IWebBrowser *iface)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)\n", This);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_GoSearch(IWebBrowser *iface)
|
static HRESULT WINAPI WebBrowser_GoSearch(IWebBrowser *iface)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)\n", This);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_Navigate(IWebBrowser *iface, BSTR URL,
|
static HRESULT WINAPI WebBrowser_Navigate(IWebBrowser *iface, BSTR URL,
|
||||||
VARIANT *Flags, VARIANT *TargetFrameName,
|
VARIANT *Flags, VARIANT *TargetFrameName,
|
||||||
VARIANT *PostData, VARIANT *Headers)
|
VARIANT *PostData, VARIANT *Headers)
|
||||||
{
|
{
|
||||||
FIXME("stub: URL = %p (%p, %p, %p, %p)\n", URL, Flags, TargetFrameName,
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
|
FIXME("(%p)->(%s %p %p %p %p)\n", This, debugstr_w(URL), Flags, TargetFrameName,
|
||||||
PostData, Headers);
|
PostData, Headers);
|
||||||
return S_OK;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_Refresh(IWebBrowser *iface)
|
static HRESULT WINAPI WebBrowser_Refresh(IWebBrowser *iface)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)\n", This);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_Refresh2(IWebBrowser *iface, VARIANT *Level)
|
static HRESULT WINAPI WebBrowser_Refresh2(IWebBrowser *iface, VARIANT *Level)
|
||||||
{
|
{
|
||||||
FIXME("stub: %p\n", Level);
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, Level);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_Stop(IWebBrowser *iface)
|
static HRESULT WINAPI WebBrowser_Stop(IWebBrowser *iface)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)\n", This);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Application(IWebBrowser *iface, IDispatch **ppDisp)
|
static HRESULT WINAPI WebBrowser_get_Application(IWebBrowser *iface, IDispatch **ppDisp)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, ppDisp);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Parent(IWebBrowser *iface, IDispatch **ppDisp)
|
static HRESULT WINAPI WebBrowser_get_Parent(IWebBrowser *iface, IDispatch **ppDisp)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, ppDisp);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Container(IWebBrowser *iface, IDispatch **ppDisp)
|
static HRESULT WINAPI WebBrowser_get_Container(IWebBrowser *iface, IDispatch **ppDisp)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, ppDisp);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Document(IWebBrowser *iface, IDispatch **ppDisp)
|
static HRESULT WINAPI WebBrowser_get_Document(IWebBrowser *iface, IDispatch **ppDisp)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, ppDisp);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_TopLevelContainer(IWebBrowser *iface, VARIANT_BOOL *pBool)
|
static HRESULT WINAPI WebBrowser_get_TopLevelContainer(IWebBrowser *iface, VARIANT_BOOL *pBool)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, pBool);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Type(IWebBrowser *iface, BSTR *Type)
|
static HRESULT WINAPI WebBrowser_get_Type(IWebBrowser *iface, BSTR *Type)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, Type);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Left(IWebBrowser *iface, long *pl)
|
static HRESULT WINAPI WebBrowser_get_Left(IWebBrowser *iface, long *pl)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, pl);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_put_Left(IWebBrowser *iface, long Left)
|
static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser *iface, long Left)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%ld)\n", This, Left);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Top(IWebBrowser *iface, long *pl)
|
static HRESULT WINAPI WebBrowser_get_Top(IWebBrowser *iface, long *pl)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, pl);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_put_Top(IWebBrowser *iface, long Top)
|
static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser *iface, long Top)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%ld)\n", This, Top);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Width(IWebBrowser *iface, long *pl)
|
static HRESULT WINAPI WebBrowser_get_Width(IWebBrowser *iface, long *pl)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, pl);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_put_Width(IWebBrowser *iface, long Width)
|
static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser *iface, long Width)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%ld)\n", This, Width);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Height(IWebBrowser *iface, long *pl)
|
static HRESULT WINAPI WebBrowser_get_Height(IWebBrowser *iface, long *pl)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, pl);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_put_Height(IWebBrowser *iface, long Height)
|
static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser *iface, long Height)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%ld)\n", This, Height);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_LocationName(IWebBrowser *iface, BSTR *LocationName)
|
static HRESULT WINAPI WebBrowser_get_LocationName(IWebBrowser *iface, BSTR *LocationName)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, LocationName);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_LocationURL(IWebBrowser *iface, BSTR *LocationURL)
|
static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser *iface, BSTR *LocationURL)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, LocationURL);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI WB_get_Busy(IWebBrowser *iface, VARIANT_BOOL *pBool)
|
static HRESULT WINAPI WebBrowser_get_Busy(IWebBrowser *iface, VARIANT_BOOL *pBool)
|
||||||
{
|
{
|
||||||
FIXME("stub \n");
|
WebBrowser *This = WEBBROWSER_THIS(iface);
|
||||||
return S_OK;
|
FIXME("(%p)->(%p)\n", This, pBool);
|
||||||
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef WEBBROWSER_THIS
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* IWebBrowser virtual function table for IE Web Browser component
|
* IWebBrowser virtual function table for IWebBrowser interface
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const IWebBrowserVtbl WB_Vtbl =
|
static const IWebBrowserVtbl WebBrowserVtbl =
|
||||||
{
|
{
|
||||||
WB_QueryInterface,
|
WebBrowser_QueryInterface,
|
||||||
WB_AddRef,
|
WebBrowser_AddRef,
|
||||||
WB_Release,
|
WebBrowser_Release,
|
||||||
WB_GetTypeInfoCount,
|
WebBrowser_GetTypeInfoCount,
|
||||||
WB_GetTypeInfo,
|
WebBrowser_GetTypeInfo,
|
||||||
WB_GetIDsOfNames,
|
WebBrowser_GetIDsOfNames,
|
||||||
WB_Invoke,
|
WebBrowser_Invoke,
|
||||||
WB_GoBack,
|
WebBrowser_GoBack,
|
||||||
WB_GoForward,
|
WebBrowser_GoForward,
|
||||||
WB_GoHome,
|
WebBrowser_GoHome,
|
||||||
WB_GoSearch,
|
WebBrowser_GoSearch,
|
||||||
WB_Navigate,
|
WebBrowser_Navigate,
|
||||||
WB_Refresh,
|
WebBrowser_Refresh,
|
||||||
WB_Refresh2,
|
WebBrowser_Refresh2,
|
||||||
WB_Stop,
|
WebBrowser_Stop,
|
||||||
WB_get_Application,
|
WebBrowser_get_Application,
|
||||||
WB_get_Parent,
|
WebBrowser_get_Parent,
|
||||||
WB_get_Container,
|
WebBrowser_get_Container,
|
||||||
WB_get_Document,
|
WebBrowser_get_Document,
|
||||||
WB_get_TopLevelContainer,
|
WebBrowser_get_TopLevelContainer,
|
||||||
WB_get_Type,
|
WebBrowser_get_Type,
|
||||||
WB_get_Left,
|
WebBrowser_get_Left,
|
||||||
WB_put_Left,
|
WebBrowser_put_Left,
|
||||||
WB_get_Top,
|
WebBrowser_get_Top,
|
||||||
WB_put_Top,
|
WebBrowser_put_Top,
|
||||||
WB_get_Width,
|
WebBrowser_get_Width,
|
||||||
WB_put_Width,
|
WebBrowser_put_Width,
|
||||||
WB_get_Height,
|
WebBrowser_get_Height,
|
||||||
WB_put_Height,
|
WebBrowser_put_Height,
|
||||||
WB_get_LocationName,
|
WebBrowser_get_LocationName,
|
||||||
WB_get_LocationURL,
|
WebBrowser_get_LocationURL,
|
||||||
WB_get_Busy
|
WebBrowser_get_Busy
|
||||||
};
|
};
|
||||||
|
|
||||||
IWebBrowserImpl SHDOCVW_WebBrowser = {&WB_Vtbl};
|
HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
|
||||||
|
{
|
||||||
|
WebBrowser *ret;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv);
|
||||||
|
|
||||||
|
ret = HeapAlloc(GetProcessHeap(), 0, sizeof(WebBrowser));
|
||||||
|
|
||||||
|
ret->lpWebBrowserVtbl = &WebBrowserVtbl;
|
||||||
|
ret->ref = 0;
|
||||||
|
|
||||||
|
WebBrowser_OleObject_Init(ret);
|
||||||
|
|
||||||
|
hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv);
|
||||||
|
if(SUCCEEDED(hres)) {
|
||||||
|
SHDOCVW_LockModule();
|
||||||
|
}else {
|
||||||
|
HeapFree(GetProcessHeap(), 0, ret);
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue