Implemented stubs for IWebBrowser in shdocvw.dll.

This commit is contained in:
John R. Sheets 2001-01-11 22:32:44 +00:00 committed by Alexandre Julliard
parent d9b114df03
commit bc80a3b4c7
19 changed files with 2056 additions and 1 deletions

View File

@ -144,6 +144,7 @@ DLLS = \
rpcrt4 \
serialui \
setupapi \
shdocvw \
shell32 \
shfolder \
shlwapi \

2
configure vendored
View File

@ -6836,6 +6836,7 @@ dlls/richedit/Makefile
dlls/rpcrt4/Makefile
dlls/serialui/Makefile
dlls/setupapi/Makefile
dlls/shdocvw/Makefile
dlls/shell32/Makefile
dlls/shfolder/Makefile
dlls/shlwapi/Makefile
@ -7078,6 +7079,7 @@ dlls/richedit/Makefile
dlls/rpcrt4/Makefile
dlls/serialui/Makefile
dlls/setupapi/Makefile
dlls/shdocvw/Makefile
dlls/shell32/Makefile
dlls/shfolder/Makefile
dlls/shlwapi/Makefile

View File

@ -1179,6 +1179,7 @@ dlls/richedit/Makefile
dlls/rpcrt4/Makefile
dlls/serialui/Makefile
dlls/setupapi/Makefile
dlls/shdocvw/Makefile
dlls/shell32/Makefile
dlls/shfolder/Makefile
dlls/shlwapi/Makefile

View File

@ -48,6 +48,7 @@ DLLFILES = \
rpcrt4/librpcrt4.@LIBEXT@ \
serialui/libserialui.@LIBEXT@ \
setupapi/libsetupapi.@LIBEXT@ \
shdocvw/libshdocvw.@LIBEXT@ \
shell32/libshell32.@LIBEXT@ \
shfolder/libshfolder.@LIBEXT@ \
shlwapi/libshlwapi.@LIBEXT@ \
@ -163,6 +164,7 @@ SUBDIRS = \
rpcrt4 \
serialui \
setupapi \
shdocvw \
shell32 \
shfolder \
shlwapi \
@ -337,6 +339,9 @@ libserialui.@LIBEXT@: serialui/libserialui.@LIBEXT@
libsetupapi.@LIBEXT@ libsetupx.@LIBEXT@: setupapi/libsetupapi.@LIBEXT@
$(RM) $@ && $(LN_S) setupapi/libsetupapi.@LIBEXT@ $@
libshdocvw.@LIBEXT@: shdocvw/libshdocvw.@LIBEXT@
$(RM) $@ && $(LN_S) shdocvw/libshdocvw.@LIBEXT@ $@
libshell32.@LIBEXT@ libshell.@LIBEXT@: shell32/libshell32.@LIBEXT@
$(RM) $@ && $(LN_S) shell32/libshell32.@LIBEXT@ $@
@ -439,6 +444,7 @@ richedit/libriched32.@LIBEXT@: libuser32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.
rpcrt4/librpcrt4.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@
serialui/libserialui.@LIBEXT@: libuser32.@LIBEXT@ libadvapi32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@
setupapi/libsetupapi.@LIBEXT@: libadvapi32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@
shdocvw/libshdocvw.@LIBEXT@: libole32.@LIBEXT@ libntdll.@LIBEXT@
shell32/libshell32.@LIBEXT@: libole32.@LIBEXT@ libshlwapi.@LIBEXT@ libcomctl32.@LIBEXT@ libuser32.@LIBEXT@ libgdi32.@LIBEXT@ libadvapi32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@
shfolder/libshfolder.@LIBEXT@: libshell32.@LIBEXT@
shlwapi/libshlwapi.@LIBEXT@: libadvapi32.@LIBEXT@ libuser32.@LIBEXT@ libgdi32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@

2
dlls/shdocvw/.cvsignore Normal file
View File

@ -0,0 +1,2 @@
Makefile
shdocvw.spec.c

22
dlls/shdocvw/Makefile.in Normal file
View File

@ -0,0 +1,22 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = shdocvw
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
classinfo.c \
events.c \
factory.c \
misc.c \
oleobject.c \
persist.c \
shdocvw_main.c \
webbrowser.c
@MAKE_DLL_RULES@
### Dependencies:

153
dlls/shdocvw/classinfo.c Normal file
View File

@ -0,0 +1,153 @@
/*
* Implementation of IProvideClassInfo interfaces for IE Web Browser control
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#include "debugtools.h"
#include "shdocvw.h"
DEFAULT_DEBUG_CHANNEL(shdocvw);
/**********************************************************************
* Implement the IProvideClassInfo interface
*
* FIXME: Should we just pass in the IProvideClassInfo2 methods rather
* reimplementing them here?
*/
static HRESULT WINAPI WBPCI_QueryInterface(LPPROVIDECLASSINFO iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IProvideClassInfoImpl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WBPCI_AddRef(LPPROVIDECLASSINFO iface)
{
ICOM_THIS(IProvideClassInfoImpl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WBPCI_Release(LPPROVIDECLASSINFO iface)
{
ICOM_THIS(IProvideClassInfoImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
/* Return an ITypeInfo interface to retrieve type library info about
* this control.
*/
static HRESULT WINAPI WBPCI_GetClassInfo(LPPROVIDECLASSINFO iface, LPTYPEINFO *ppTI)
{
FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
return S_OK;
}
/**********************************************************************
* IProvideClassInfo virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IProvideClassInfo) WBPCI_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBPCI_QueryInterface,
WBPCI_AddRef,
WBPCI_Release,
WBPCI_GetClassInfo
};
IProvideClassInfoImpl SHDOCVW_ProvideClassInfo = { &WBPCI_Vtbl, 1 };
/**********************************************************************
* Implement the IProvideClassInfo2 interface (inherits from
* IProvideClassInfo).
*/
static HRESULT WINAPI WBPCI2_QueryInterface(LPPROVIDECLASSINFO2 iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IProvideClassInfo2Impl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WBPCI2_AddRef(LPPROVIDECLASSINFO2 iface)
{
ICOM_THIS(IProvideClassInfo2Impl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WBPCI2_Release(LPPROVIDECLASSINFO2 iface)
{
ICOM_THIS(IProvideClassInfo2Impl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
/* Return an ITypeInfo interface to retrieve type library info about
* this control.
*/
static HRESULT WINAPI WBPCI2_GetClassInfo(LPPROVIDECLASSINFO2 iface, LPTYPEINFO *ppTI)
{
FIXME("stub: LPTYPEINFO = %p\n", *ppTI);
return S_OK;
}
/* Get the IID for generic default event callbacks. This IID will
* in theory be used to later query for an IConnectionPoint to connect
* an event sink (callback implmentation in the OLE control site)
* to this control.
*/
static HRESULT WINAPI WBPCI2_GetGUID(LPPROVIDECLASSINFO2 iface,
DWORD dwGuidKind, GUID *pGUID)
{
FIXME("stub: dwGuidKind = %ld, pGUID = %s\n", dwGuidKind, debugstr_guid(pGUID));
if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
{
FIXME ("Requested unsupported GUID type: %ld\n", dwGuidKind);
return E_FAIL; /* Is there a better return type here? */
}
/* FIXME: Returning IPropertyNotifySink interface, but should really
* return a more generic event set (???) dispinterface.
* However, this hack, allows a control site to return with success
* (MFC's COleControlSite falls back to older IProvideClassInfo interface
* if GetGUID() fails to return a non-NULL GUID).
*/
memcpy(pGUID, &IID_IPropertyNotifySink, sizeof(GUID));
FIXME("Wrongly returning IPropertyNotifySink interface %s\n",
debugstr_guid(pGUID));
return S_OK;
}
/**********************************************************************
* IProvideClassInfo virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IProvideClassInfo2) WBPCI2_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBPCI2_QueryInterface,
WBPCI2_AddRef,
WBPCI2_Release,
WBPCI2_GetClassInfo,
WBPCI2_GetGUID
};
IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2 = { &WBPCI2_Vtbl, 1 };

196
dlls/shdocvw/events.c Normal file
View File

@ -0,0 +1,196 @@
/*
* Implementation of event-related interfaces for IE Web Browser control:
*
* - IConnectionPointContainer
* - IConnectionPoint
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#include "debugtools.h"
#include "shdocvw.h"
DEFAULT_DEBUG_CHANNEL(shdocvw);
/**********************************************************************
* Implement the IConnectionPointContainer interface
*/
static HRESULT WINAPI WBCPC_QueryInterface(LPCONNECTIONPOINTCONTAINER iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IConnectionPointContainerImpl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WBCPC_AddRef(LPCONNECTIONPOINTCONTAINER iface)
{
ICOM_THIS(IConnectionPointContainerImpl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WBCPC_Release(LPCONNECTIONPOINTCONTAINER iface)
{
ICOM_THIS(IConnectionPointContainerImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
/* Get a list of connection points inside this container. */
static HRESULT WINAPI WBCPC_EnumConnectionPoints(LPCONNECTIONPOINTCONTAINER iface,
LPENUMCONNECTIONPOINTS *ppEnum)
{
FIXME("stub: IEnumConnectionPoints = %p\n", *ppEnum);
return S_OK;
}
/* Retrieve the connection point in this container associated with the
* riid interface. When events occur in the control, the control can
* call backwards into its embedding site, through these interfaces.
*/
static HRESULT WINAPI WBCPC_FindConnectionPoint(LPCONNECTIONPOINTCONTAINER iface,
REFIID riid, LPCONNECTIONPOINT *ppCP)
{
TRACE(": IID = %s, IConnectionPoint = %p\n", debugstr_guid(riid), *ppCP);
/* For now, return the same IConnectionPoint object for both
* event interface requests.
*/
if (IsEqualGUID (&IID_INotifyDBEvents, riid))
{
TRACE("Returning connection point %p for IID_INotifyDBEvents\n",
&SHDOCVW_ConnectionPoint);
*ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
return S_OK;
}
else if (IsEqualGUID (&IID_IPropertyNotifySink, riid))
{
TRACE("Returning connection point %p for IID_IPropertyNotifySink\n",
&SHDOCVW_ConnectionPoint);
*ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
return S_OK;
}
return E_FAIL;
}
/**********************************************************************
* IConnectionPointContainer virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IConnectionPointContainer) WBCPC_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBCPC_QueryInterface,
WBCPC_AddRef,
WBCPC_Release,
WBCPC_EnumConnectionPoints,
WBCPC_FindConnectionPoint
};
IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer = { &WBCPC_Vtbl, 1 };
/**********************************************************************
* Implement the IConnectionPoint interface
*/
static HRESULT WINAPI WBCP_QueryInterface(LPCONNECTIONPOINT iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IConnectionPointImpl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WBCP_AddRef(LPCONNECTIONPOINT iface)
{
ICOM_THIS(IConnectionPointImpl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WBCP_Release(LPCONNECTIONPOINT iface)
{
ICOM_THIS(IConnectionPointImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
static HRESULT WINAPI WBCP_GetConnectionInterface(LPCONNECTIONPOINT iface, IID* pIId)
{
FIXME("stub: %s\n", debugstr_guid(pIId));
return S_OK;
}
/* Get this connection point's owning container */
static HRESULT WINAPI
WBCP_GetConnectionPointContainer(LPCONNECTIONPOINT iface,
LPCONNECTIONPOINTCONTAINER *ppCPC)
{
FIXME("stub: IConnectionPointContainer = %p\n", *ppCPC);
return S_OK;
}
/* Connect the pUnkSink event-handling implementation (in the control site)
* to this connection point. Return a handle to this connection in
* pdwCookie (for later use in Unadvise()).
*/
static HRESULT WINAPI WBCP_Advise(LPCONNECTIONPOINT iface,
LPUNKNOWN pUnkSink, DWORD *pdwCookie)
{
static int new_cookie;
FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink, *pdwCookie);
*pdwCookie = ++new_cookie;
TRACE ("Returning cookie = %ld\n", *pdwCookie);
return S_OK;
}
/* Disconnect this implementation from the connection point. */
static HRESULT WINAPI WBCP_Unadvise(LPCONNECTIONPOINT iface,
DWORD dwCookie)
{
FIXME("stub: cookie to disconnect = %ld\n", dwCookie);
return S_OK;
}
/* Get a list of connections in this connection point. */
static HRESULT WINAPI WBCP_EnumConnections(LPCONNECTIONPOINT iface,
LPENUMCONNECTIONS *ppEnum)
{
FIXME("stub: IEnumConnections = %p\n", *ppEnum);
return S_OK;
}
/**********************************************************************
* IConnectionPoint virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IConnectionPoint) WBCP_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBCP_QueryInterface,
WBCP_AddRef,
WBCP_Release,
WBCP_GetConnectionInterface,
WBCP_GetConnectionPointContainer,
WBCP_Advise,
WBCP_Unadvise,
WBCP_EnumConnections
};
IConnectionPointImpl SHDOCVW_ConnectionPoint = { &WBCP_Vtbl, 1 };

107
dlls/shdocvw/factory.c Normal file
View File

@ -0,0 +1,107 @@
/*
* Implementation of class factory for IE Web Browser
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#include "debugtools.h"
#include "shdocvw.h"
DEFAULT_DEBUG_CHANNEL(shdocvw);
/**********************************************************************
* Implement the IWebBrowser class factory
*
* (Based on implementation in ddraw/main.c)
*/
/**********************************************************************
* WBCF_QueryInterface (IUnknown)
*/
static HRESULT WINAPI WBCF_QueryInterface(LPCLASSFACTORY iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl, iface);
TRACE ("\n");
/*
* Perform a sanity check on the parameters.
*/
if ((This == NULL) || (ppobj == NULL) )
return E_INVALIDARG;
return E_NOINTERFACE;
}
/************************************************************************
* WBCF_AddRef (IUnknown)
*/
static ULONG WINAPI WBCF_AddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl, iface);
TRACE("\n");
return ++(This->ref);
}
/************************************************************************
* WBCF_Release (IUnknown)
*/
static ULONG WINAPI WBCF_Release(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
/************************************************************************
* WBCF_CreateInstance (IClassFactory)
*/
static HRESULT WINAPI WBCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl, iface);
/* 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;
}
/************************************************************************
* WBCF_LockServer (IClassFactory)
*/
static HRESULT WINAPI WBCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
{
ICOM_THIS(IClassFactoryImpl, iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) WBCF_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBCF_QueryInterface,
WBCF_AddRef,
WBCF_Release,
WBCF_CreateInstance,
WBCF_LockServer
};
IClassFactoryImpl SHDOCVW_ClassFactory = { &WBCF_Vtbl, 1 };

80
dlls/shdocvw/misc.c Normal file
View File

@ -0,0 +1,80 @@
/*
* Implementation of miscellaneous interfaces for IE Web Browser control:
*
* - IQuickActivate
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#include "debugtools.h"
#include "shdocvw.h"
DEFAULT_DEBUG_CHANNEL(shdocvw);
/**********************************************************************
* Implement the IQuickActivate interface
*/
static HRESULT WINAPI WBQA_QueryInterface(LPQUICKACTIVATE iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IQuickActivateImpl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WBQA_AddRef(LPQUICKACTIVATE iface)
{
ICOM_THIS(IQuickActivateImpl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WBQA_Release(LPQUICKACTIVATE iface)
{
ICOM_THIS(IQuickActivateImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
/* Alternative interface for quicker, easier activation of a control. */
static HRESULT WINAPI WBQA_QuickActivate(LPQUICKACTIVATE iface,
QACONTAINER *pQaContainer,
QACONTROL *pQaControl)
{
FIXME("stub: QACONTAINER = %p, QACONTROL = %p\n", pQaContainer, pQaControl);
return S_OK;
}
static HRESULT WINAPI WBQA_SetContentExtent(LPQUICKACTIVATE iface, LPSIZEL pSizel)
{
FIXME("stub: LPSIZEL = %p\n", pSizel);
return E_NOINTERFACE;
}
static HRESULT WINAPI WBQA_GetContentExtent(LPQUICKACTIVATE iface, LPSIZEL pSizel)
{
FIXME("stub: LPSIZEL = %p\n", pSizel);
return E_NOINTERFACE;
}
/**********************************************************************
* IQuickActivate virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IQuickActivate) WBQA_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBQA_QueryInterface,
WBQA_AddRef,
WBQA_Release,
WBQA_QuickActivate,
WBQA_SetContentExtent,
WBQA_GetContentExtent
};
IQuickActivateImpl SHDOCVW_QuickActivate = { &WBQA_Vtbl, 1 };

603
dlls/shdocvw/oleobject.c Normal file
View File

@ -0,0 +1,603 @@
/*
* Implementation of IOleObject interfaces for IE Web Browser
*
* - IOleObject
* - IOleInPlaceObject
* - IOleControl
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#include "debugtools.h"
#include "shdocvw.h"
#include "ole2.h"
DEFAULT_DEBUG_CHANNEL(shdocvw);
/**********************************************************************
* 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);
static ULONG WINAPI WBOOBJ_Release(LPOLEOBJECT iface);
/************************************************************************
* 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)
{
ICOM_THIS(IOleObjectImpl, iface);
/*
* 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));
return E_NOINTERFACE;
}
/************************************************************************
* WBOOBJ_AddRef (IUnknown)
*/
static ULONG WINAPI WBOOBJ_AddRef(LPOLEOBJECT iface)
{
ICOM_THIS(IOleObjectImpl, iface);
TRACE("\n");
return ++(This->ref);
}
/************************************************************************
* WBOOBJ_Release (IUnknown)
*/
static ULONG WINAPI WBOOBJ_Release(LPOLEOBJECT iface)
{
ICOM_THIS(IOleObjectImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
/************************************************************************
* WBOOBJ_SetClientSite (IOleObject)
*/
static HRESULT WINAPI WBOOBJ_SetClientSite(LPOLEOBJECT iface,
LPOLECLIENTSITE pClientSite)
{
FIXME("stub: (%p, %p)\n", iface, pClientSite);
return S_OK;
}
/************************************************************************
* WBOOBJ_GetClientSite (IOleObject)
*/
static HRESULT WINAPI WBOOBJ_GetClientSite(LPOLEOBJECT iface,
LPOLECLIENTSITE* ppClientSite)
{
FIXME("stub: (%p)\n", *ppClientSite);
return S_OK;
}
/************************************************************************
* WBOOBJ_SetHostNames (IOleObject)
*/
static HRESULT WINAPI WBOOBJ_SetHostNames(LPOLEOBJECT iface, LPCOLESTR szContainerApp,
LPCOLESTR szContainerObj)
{
FIXME("stub: (%p, %s, %s)\n", iface, debugstr_w(szContainerApp),
debugstr_w(szContainerObj));
return S_OK;
}
/************************************************************************
* WBOOBJ_Close (IOleObject)
*/
static HRESULT WINAPI WBOOBJ_Close(LPOLEOBJECT iface, DWORD dwSaveOption)
{
FIXME("stub: ()\n");
return S_OK;
}
/************************************************************************
* WBOOBJ_SetMoniker (IOleObject)
*/
static HRESULT WINAPI WBOOBJ_SetMoniker(LPOLEOBJECT iface,
DWORD dwWhichMoniker, IMoniker* pmk)
{
FIXME("stub: (%p, %ld, %p)\n", iface, dwWhichMoniker, pmk);
return S_OK;
}
/************************************************************************
* 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)
{
FIXME("stub (%p, %ld, %ld, %p)\n", iface, dwAssign, dwWhichMoniker, ppmk);
return E_UNSPEC;
}
/************************************************************************
* 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)
{
FIXME("stub: (%p, %p, %d, %ld)\n", iface, pDataObject, fCreation, dwReserved);
return OLE_E_NOTRUNNING;
}
/************************************************************************
* WBOOBJ_GetClipboardData (IOleObject)
*
* This method is meaningless if the server is not running
*/
static HRESULT WINAPI WBOOBJ_GetClipboardData(LPOLEOBJECT iface, DWORD dwReserved,
LPDATAOBJECT *ppDataObject)
{
FIXME("stub: (%p, %ld, %p)\n", iface, dwReserved, ppDataObject);
return OLE_E_NOTRUNNING;
}
/************************************************************************
* WBOOBJ_DoVerb (IOleObject)
*/
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);
switch (iVerb)
{
case OLEIVERB_INPLACEACTIVATE:
FIXME ("stub for OLEIVERB_INPLACEACTIVATE\n");
break;
case OLEIVERB_HIDE:
FIXME ("stub for OLEIVERB_HIDE\n");
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;
}
/************************************************************************
* WBOOBJ_IsUpToDate (IOleObject)
*
* This method is meaningless if the server is not running
*/
static HRESULT WINAPI WBOOBJ_IsUpToDate(LPOLEOBJECT iface)
{
FIXME("(%p)\n", iface);
return OLE_E_NOTRUNNING;
}
/************************************************************************
* WBOOBJ_GetUserClassID (IOleObject)
*/
static HRESULT WINAPI WBOOBJ_GetUserClassID(LPOLEOBJECT iface, CLSID* pClsid)
{
FIXME("stub: (%p, %p)\n", iface, pClsid);
return S_OK;
}
/************************************************************************
* WBOOBJ_GetUserType (IOleObject)
*
* Delegate to OleRegGetUserType.
*/
static HRESULT WINAPI WBOOBJ_GetUserType(LPOLEOBJECT iface, DWORD dwFormOfType,
LPOLESTR* pszUserType)
{
TRACE("(%p, %ld, %p)\n", iface, dwFormOfType, pszUserType);
return OleRegGetUserType(&CLSID_WebBrowser, dwFormOfType, pszUserType);
}
/************************************************************************
* 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,
psizel->cx, psizel->cy);
return OLE_E_NOTRUNNING;
}
/************************************************************************
* WBOOBJ_GetExtent (IOleObject)
*/
static HRESULT WINAPI WBOOBJ_GetExtent(LPOLEOBJECT iface, DWORD dwDrawAspect,
SIZEL* psizel)
{
FIXME("stub: (%p, %lx, %p)\n", iface, dwDrawAspect, psizel);
return S_OK;
}
/************************************************************************
* WBOOBJ_Advise (IOleObject)
*/
static HRESULT WINAPI WBOOBJ_Advise(LPOLEOBJECT iface, IAdviseSink* pAdvSink,
DWORD* pdwConnection)
{
FIXME("stub: (%p, %p, %p)\n", iface, pAdvSink, pdwConnection);
return S_OK;
}
/************************************************************************
* 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)
{
HRESULT hres;
TRACE("(%p, %lx, %p)\n", iface, dwAspect, pdwStatus);
hres = OleRegGetMiscStatus(&CLSID_WebBrowser, dwAspect, pdwStatus);
if (FAILED(hres))
*pdwStatus = 0;
return S_OK;
}
/************************************************************************
* 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);
return OLE_E_NOTRUNNING;
}
/**********************************************************************
* IOleObject virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IOleObject) WBOOBJ_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBOOBJ_QueryInterface,
WBOOBJ_AddRef,
WBOOBJ_Release,
WBOOBJ_SetClientSite,
WBOOBJ_GetClientSite,
WBOOBJ_SetHostNames,
WBOOBJ_Close,
WBOOBJ_SetMoniker,
WBOOBJ_GetMoniker,
WBOOBJ_InitFromData,
WBOOBJ_GetClipboardData,
WBOOBJ_DoVerb,
WBOOBJ_EnumVerbs,
WBOOBJ_Update,
WBOOBJ_IsUpToDate,
WBOOBJ_GetUserClassID,
WBOOBJ_GetUserType,
WBOOBJ_SetExtent,
WBOOBJ_GetExtent,
WBOOBJ_Advise,
WBOOBJ_Unadvise,
WBOOBJ_EnumAdvise,
WBOOBJ_GetMiscStatus,
WBOOBJ_SetColorScheme
};
IOleObjectImpl SHDOCVW_OleObject = { &WBOOBJ_Vtbl, 1 };
/**********************************************************************
* Implement the IOleInPlaceObject interface
*/
static HRESULT WINAPI WBOIPO_QueryInterface(LPOLEINPLACEOBJECT iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IOleInPlaceObjectImpl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WBOIPO_AddRef(LPOLEINPLACEOBJECT iface)
{
ICOM_THIS(IOleInPlaceObjectImpl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WBOIPO_Release(LPOLEINPLACEOBJECT iface)
{
ICOM_THIS(IOleInPlaceObjectImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
static HRESULT WINAPI WBOIPO_GetWindow(LPOLEINPLACEOBJECT iface, HWND* phwnd)
{
#if 0
/* Create a fake window to fool MFC into believing that we actually
* have an implemented browser control. Avoids the assertion.
*/
HWND hwnd;
hwnd = CreateWindowA("BUTTON", "Web Control",
WS_HSCROLL | WS_VSCROLL | WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 600,
400, NULL, NULL, NULL, NULL);
*phwnd = hwnd;
TRACE ("Returning hwnd = %d\n", hwnd);
#endif
FIXME("stub HWND* = %p\n", phwnd);
return S_OK;
}
static HRESULT WINAPI WBOIPO_ContextSensitiveHelp(LPOLEINPLACEOBJECT iface,
BOOL fEnterMode)
{
FIXME("stub fEnterMode = %d\n", fEnterMode);
return S_OK;
}
static HRESULT WINAPI WBOIPO_InPlaceDeactivate(LPOLEINPLACEOBJECT iface)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WBOIPO_UIDeactivate(LPOLEINPLACEOBJECT iface)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WBOIPO_SetObjectRects(LPOLEINPLACEOBJECT iface,
LPCRECT lprcPosRect, LPCRECT lprcClipRect)
{
FIXME("stub PosRect = %p, ClipRect = %p\n", lprcPosRect, lprcClipRect);
return S_OK;
}
static HRESULT WINAPI WBOIPO_ReactivateAndUndo(LPOLEINPLACEOBJECT iface)
{
FIXME("stub \n");
return S_OK;
}
/**********************************************************************
* IOleInPlaceObject virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IOleInPlaceObject) WBOIPO_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBOIPO_QueryInterface,
WBOIPO_AddRef,
WBOIPO_Release,
WBOIPO_GetWindow,
WBOIPO_ContextSensitiveHelp,
WBOIPO_InPlaceDeactivate,
WBOIPO_UIDeactivate,
WBOIPO_SetObjectRects,
WBOIPO_ReactivateAndUndo
};
IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject = { &WBOIPO_Vtbl, 1 };
/**********************************************************************
* Implement the IOleControl interface
*/
static HRESULT WINAPI WBOC_QueryInterface(LPOLECONTROL iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IOleControlImpl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WBOC_AddRef(LPOLECONTROL iface)
{
ICOM_THIS(IOleControlImpl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WBOC_Release(LPOLECONTROL iface)
{
ICOM_THIS(IOleControlImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
static HRESULT WINAPI WBOC_GetControlInfo(LPOLECONTROL iface, LPCONTROLINFO pCI)
{
FIXME("stub: LPCONTROLINFO = %p\n", pCI);
return S_OK;
}
static HRESULT WINAPI WBOC_OnMnemonic(LPOLECONTROL iface, struct tagMSG *pMsg)
{
FIXME("stub: MSG* = %p\n", pMsg);
return S_OK;
}
static HRESULT WINAPI WBOC_OnAmbientPropertyChange(LPOLECONTROL iface, DISPID dispID)
{
FIXME("stub: DISPID = %ld\n", dispID);
return S_OK;
}
static HRESULT WINAPI WBOC_FreezeEvents(LPOLECONTROL iface, BOOL bFreeze)
{
FIXME("stub: bFreeze = %d\n", bFreeze);
return S_OK;
}
/**********************************************************************
* IOleControl virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IOleControl) WBOC_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBOC_QueryInterface,
WBOC_AddRef,
WBOC_Release,
WBOC_GetControlInfo,
WBOC_OnMnemonic,
WBOC_OnAmbientPropertyChange,
WBOC_FreezeEvents
};
IOleControlImpl SHDOCVW_OleControl = { &WBOC_Vtbl, 1 };

186
dlls/shdocvw/persist.c Normal file
View File

@ -0,0 +1,186 @@
/*
* Implementation of IPersist interfaces for IE Web Browser control
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#include "debugtools.h"
#include "shdocvw.h"
DEFAULT_DEBUG_CHANNEL(shdocvw);
/**********************************************************************
* Implement the IPersistStorage interface
*/
static HRESULT WINAPI WBPS_QueryInterface(LPPERSISTSTORAGE iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IPersistStorageImpl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WBPS_AddRef(LPPERSISTSTORAGE iface)
{
ICOM_THIS(IPersistStorageImpl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WBPS_Release(LPPERSISTSTORAGE iface)
{
ICOM_THIS(IPersistStorageImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
static HRESULT WINAPI WBPS_GetClassID(LPPERSISTSTORAGE iface, CLSID *pClassID)
{
FIXME("stub: CLSID = %s\n", debugstr_guid(pClassID));
return S_OK;
}
static HRESULT WINAPI WBPS_IsDirty(LPPERSISTSTORAGE iface)
{
FIXME("stub\n");
return S_OK;
}
static HRESULT WINAPI WBPS_InitNew(LPPERSISTSTORAGE iface, LPSTORAGE pStg)
{
FIXME("stub: LPSTORAGE = %p\n", pStg);
return S_OK;
}
static HRESULT WINAPI WBPS_Load(LPPERSISTSTORAGE iface, LPSTORAGE pStg)
{
FIXME("stub: LPSTORAGE = %p\n", pStg);
return S_OK;
}
static HRESULT WINAPI WBPS_Save(LPPERSISTSTORAGE iface, LPSTORAGE pStg,
BOOL fSameAsLoad)
{
FIXME("stub: LPSTORAGE = %p, fSameAsLoad = %d\n", pStg, fSameAsLoad);
return S_OK;
}
static HRESULT WINAPI WBPS_SaveCompleted(LPPERSISTSTORAGE iface, LPSTORAGE pStgNew)
{
FIXME("stub: LPSTORAGE = %p\n", pStgNew);
return S_OK;
}
/**********************************************************************
* IPersistStorage virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IPersistStorage) WBPS_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBPS_QueryInterface,
WBPS_AddRef,
WBPS_Release,
WBPS_GetClassID,
WBPS_IsDirty,
WBPS_InitNew,
WBPS_Load,
WBPS_Save,
WBPS_SaveCompleted
};
IPersistStorageImpl SHDOCVW_PersistStorage = { &WBPS_Vtbl, 1 };
/**********************************************************************
* Implement the IPersistStreamInit interface
*/
static HRESULT WINAPI WBPSI_QueryInterface(LPPERSISTSTREAMINIT iface,
REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IPersistStreamInitImpl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WBPSI_AddRef(LPPERSISTSTREAMINIT iface)
{
ICOM_THIS(IPersistStreamInitImpl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WBPSI_Release(LPPERSISTSTREAMINIT iface)
{
ICOM_THIS(IPersistStreamInitImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
static HRESULT WINAPI WBPSI_GetClassID(LPPERSISTSTREAMINIT iface, CLSID *pClassID)
{
FIXME("stub: CLSID = %s\n", debugstr_guid(pClassID));
return S_OK;
}
static HRESULT WINAPI WBPSI_IsDirty(LPPERSISTSTREAMINIT iface)
{
FIXME("stub\n");
return S_OK;
}
static HRESULT WINAPI WBPSI_Load(LPPERSISTSTREAMINIT iface, LPSTREAM pStg)
{
FIXME("stub: LPSTORAGE = %p\n", pStg);
return S_OK;
}
static HRESULT WINAPI WBPSI_Save(LPPERSISTSTREAMINIT iface, LPSTREAM pStg,
BOOL fSameAsLoad)
{
FIXME("stub: LPSTORAGE = %p, fSameAsLoad = %d\n", pStg, fSameAsLoad);
return S_OK;
}
static HRESULT WINAPI WBPSI_GetSizeMax(LPPERSISTSTREAMINIT iface,
ULARGE_INTEGER *pcbSize)
{
FIXME("stub: ULARGE_INTEGER = %p\n", pcbSize);
return S_OK;
}
static HRESULT WINAPI WBPSI_InitNew(LPPERSISTSTREAMINIT iface)
{
FIXME("stub\n");
return S_OK;
}
/**********************************************************************
* IPersistStreamInit virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IPersistStreamInit) WBPSI_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WBPSI_QueryInterface,
WBPSI_AddRef,
WBPSI_Release,
WBPSI_GetClassID,
WBPSI_IsDirty,
WBPSI_Load,
WBPSI_Save,
WBPSI_GetSizeMax,
WBPSI_InitNew
};
IPersistStreamInitImpl SHDOCVW_PersistStreamInit = { &WBPSI_Vtbl, 1 };

193
dlls/shdocvw/shdocvw.h Normal file
View File

@ -0,0 +1,193 @@
/*
* Header includes for shdocvw.dll
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#ifndef __WINE_SHDOCVW_H
#define __WINE_SHDOCVW_H
/* FIXME: Is there a better way to deal with all these includes? */
#include "wingdi.h"
#include "winbase.h"
#include "winuser.h"
#include "wine/obj_base.h"
#include "wine/obj_storage.h"
#include "wine/obj_misc.h"
#include "wine/obj_moniker.h"
#include "wine/obj_inplace.h"
#include "wine/obj_dataobject.h"
#include "wine/obj_oleobj.h"
#include "wine/obj_oleaut.h"
#include "wine/obj_olefont.h"
#include "wine/obj_dragdrop.h"
#include "wine/obj_oleview.h"
#include "wine/obj_control.h"
#include "wine/obj_connection.h"
#include "wine/obj_property.h"
#include "wine/obj_oleundo.h"
#include "wine/obj_webbrowser.h"
/**********************************************************************
* IClassFactory declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
extern IClassFactoryImpl SHDOCVW_ClassFactory;
/**********************************************************************
* IOleObject declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IOleObject);
DWORD ref;
} IOleObjectImpl;
extern IOleObjectImpl SHDOCVW_OleObject;
/**********************************************************************
* IOleInPlaceObject declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IOleInPlaceObject);
DWORD ref;
} IOleInPlaceObjectImpl;
extern IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject;
/**********************************************************************
* IOleControl declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IOleControl);
DWORD ref;
} IOleControlImpl;
extern IOleControlImpl SHDOCVW_OleControl;
/**********************************************************************
* IWebBrowser declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IWebBrowser);
DWORD ref;
} IWebBrowserImpl;
extern IWebBrowserImpl SHDOCVW_WebBrowser;
/**********************************************************************
* IProvideClassInfo declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IProvideClassInfo);
DWORD ref;
} IProvideClassInfoImpl;
extern IProvideClassInfoImpl SHDOCVW_ProvideClassInfo;
/**********************************************************************
* IProvideClassInfo2 declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IProvideClassInfo2);
DWORD ref;
} IProvideClassInfo2Impl;
extern IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2;
/**********************************************************************
* IPersistStorage declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IPersistStorage);
DWORD ref;
} IPersistStorageImpl;
extern IPersistStorageImpl SHDOCVW_PersistStorage;
/**********************************************************************
* IPersistStreamInit declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IPersistStreamInit);
DWORD ref;
} IPersistStreamInitImpl;
extern IPersistStreamInitImpl SHDOCVW_PersistStreamInit;
/**********************************************************************
* IQuickActivate declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IQuickActivate);
DWORD ref;
} IQuickActivateImpl;
extern IQuickActivateImpl SHDOCVW_QuickActivate;
/**********************************************************************
* IConnectionPointContainer declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IConnectionPointContainer);
DWORD ref;
} IConnectionPointContainerImpl;
extern IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer;
/**********************************************************************
* IConnectionPoint declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IConnectionPoint);
DWORD ref;
} IConnectionPointImpl;
extern IConnectionPointImpl SHDOCVW_ConnectionPoint;
/* Other stuff.. */
DEFINE_GUID(IID_INotifyDBEvents,
0xdb526cc0, 0xd188, 0x11cd, 0xad, 0x48, 0x0, 0xaa, 0x0, 0x3c, 0x9c, 0xb6);
#endif /* __WINE_SHDOCVW_H */

34
dlls/shdocvw/shdocvw.spec Normal file
View File

@ -0,0 +1,34 @@
name shdocvw
type win32
import ole32.dll
import ntdll.dll
debug_channels (shdocvw)
108 stub AddUrlToFavorites
109 stdcall DllCanUnloadNow() SHDOCVW_DllCanUnloadNow
312 stdcall DllGetClassObject(long long ptr) SHDOCVW_DllGetClassObject
113 stdcall DllGetVersion(ptr) SHDOCVW_DllGetVersion
114 stdcall DllInstall(long wstr) SHDOCVW_DllInstall
124 stdcall DllRegisterServer() SHDOCVW_DllRegisterServer
126 stub DllRegisterWindowClasses
127 stdcall DllUnregisterServer() SHDOCVW_DllUnregisterServer
128 stub DoAddToFavDlg
129 stub DoAddToFavDlgW
132 stub DoFileDownload
133 stub DoFileDownloadEx
134 stub DoOrganizeFavDlg
144 stub DoOrganizeFavDlgW
106 stub HlinkFindFrame
155 stub HlinkFrameNavigate
155 stub HlinkFrameNavigateNHL
156 stub IEWriteErrorLog
157 stub OpenURL
163 stub SHAddSubscribeFavorite
166 stub SHGetIDispatchForFolder
168 stub SetQueryNetSessionCount
107 stub SetShellOfflineState
182 stub SoftwareUpdateMessageBox
184 stub URLQualifyA
186 stub URLQualifyW

View File

@ -0,0 +1,81 @@
/*
* SHDOCVW - Internet Explorer Web Control
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#include "debugtools.h"
#include "initguid.h"
#include "ole2.h"
#include "shlwapi.h"
#include "shdocvw.h"
DEFAULT_DEBUG_CHANNEL(shdocvw);
/***********************************************************************
* DllCanUnloadNow (SHDOCVW.109) */
HRESULT WINAPI SHDOCVW_DllCanUnloadNow(void)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/*************************************************************************
* DllGetClassObject (SHDOCVW.312)
*/
HRESULT WINAPI SHDOCVW_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
TRACE("\n");
if (IsEqualGUID(&IID_IClassFactory, riid))
{
/* Pass back our shdocvw class factory */
*ppv = (LPVOID)&SHDOCVW_ClassFactory;
IClassFactory_AddRef((IClassFactory*)&SHDOCVW_ClassFactory);
return S_OK;
}
return CLASS_E_CLASSNOTAVAILABLE;
}
/***********************************************************************
* DllGetVersion (SHDOCVW.113)
*/
HRESULT WINAPI SHDOCVW_DllGetVersion (DLLVERSIONINFO *pdvi)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/*************************************************************************
* DllInstall (SHDOCVW.114)
*/
HRESULT WINAPI SHDOCVW_DllInstall(BOOL bInstall, LPCWSTR cmdline)
{
FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline));
return S_OK;
}
/***********************************************************************
* DllRegisterServer (SHDOCVW.124)
*/
HRESULT WINAPI SHDOCVW_DllRegisterServer()
{
FIXME("(), stub!\n");
return S_OK;
}
/***********************************************************************
* DllUnregisterServer (SHDOCVW.127)
*/
HRESULT WINAPI SHDOCVW_DllUnregisterServer()
{
FIXME("(), stub!\n");
return S_OK;
}

267
dlls/shdocvw/webbrowser.c Normal file
View File

@ -0,0 +1,267 @@
/*
* Implementation of IWebBrowser interface for IE Web Browser control
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#include "debugtools.h"
#include "shdocvw.h"
DEFAULT_DEBUG_CHANNEL(shdocvw);
/**********************************************************************
* Implement the IWebBrowser interface
*/
static HRESULT WINAPI WB_QueryInterface(LPWEBBROWSER iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IWebBrowserImpl, iface);
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WB_AddRef(LPWEBBROWSER iface)
{
ICOM_THIS(IWebBrowserImpl, iface);
TRACE("\n");
return ++(This->ref);
}
static ULONG WINAPI WB_Release(LPWEBBROWSER iface)
{
ICOM_THIS(IWebBrowserImpl, iface);
/* static class, won't be freed */
TRACE("\n");
return --(This->ref);
}
/* IDispatch methods */
static HRESULT WINAPI WB_GetTypeInfoCount(LPWEBBROWSER iface, UINT *pctinfo)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_GetTypeInfo(LPWEBBROWSER iface, UINT iTInfo, LCID lcid,
LPTYPEINFO *ppTInfo)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_GetIDsOfNames(LPWEBBROWSER iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_Invoke(LPWEBBROWSER iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags,
DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExepInfo, UINT *puArgErr)
{
FIXME("stub dispIdMember = %d, IID = %s\n", (int)dispIdMember, debugstr_guid(riid));
return S_OK;
}
/* IWebBrowser methods */
static HRESULT WINAPI WB_GoBack(LPWEBBROWSER iface)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_GoForward(LPWEBBROWSER iface)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_GoHome(LPWEBBROWSER iface)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_GoSearch(LPWEBBROWSER iface)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_Navigate(LPWEBBROWSER iface, BSTR *URL,
VARIANT *Flags, VARIANT *TargetFrameName,
VARIANT *PostData, VARIANT *Headers)
{
FIXME("stub: URL = %p (%p, %p, %p, %p)\n", URL, Flags, TargetFrameName,
PostData, Headers);
return S_OK;
}
static HRESULT WINAPI WB_Refresh(LPWEBBROWSER iface)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_Refresh2(LPWEBBROWSER iface, VARIANT *Level)
{
FIXME("stub: %p\n", Level);
return S_OK;
}
static HRESULT WINAPI WB_Stop(LPWEBBROWSER iface)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Application(LPWEBBROWSER iface, LPVOID *ppDisp)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Parent(LPWEBBROWSER iface, LPVOID *ppDisp)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Container(LPWEBBROWSER iface, LPVOID *ppDisp)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Document(LPWEBBROWSER iface, LPVOID *ppDisp)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_TopLevelContainer(LPWEBBROWSER iface, VARIANT *pBool)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Type(LPWEBBROWSER iface, BSTR *Type)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Left(LPWEBBROWSER iface, long *pl)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_put_Left(LPWEBBROWSER iface, long Left)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Top(LPWEBBROWSER iface, long *pl)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_put_Top(LPWEBBROWSER iface, long Top)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Width(LPWEBBROWSER iface, long *pl)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_put_Width(LPWEBBROWSER iface, long Width)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Height(LPWEBBROWSER iface, long *pl)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_put_Height(LPWEBBROWSER iface, long Height)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_LocationName(LPWEBBROWSER iface, BSTR *LocationName)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_LocationURL(LPWEBBROWSER iface, BSTR *LocationURL)
{
FIXME("stub \n");
return S_OK;
}
static HRESULT WINAPI WB_get_Busy(LPWEBBROWSER iface, VARIANT *pBool)
{
FIXME("stub \n");
return S_OK;
}
/**********************************************************************
* IWebBrowser virtual function table for IE Web Browser component
*/
static ICOM_VTABLE(IWebBrowser) WB_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WB_QueryInterface,
WB_AddRef,
WB_Release,
WB_GetTypeInfoCount,
WB_GetTypeInfo,
WB_GetIDsOfNames,
WB_Invoke,
WB_GoBack,
WB_GoForward,
WB_GoHome,
WB_GoSearch,
WB_Navigate,
WB_Refresh,
WB_Refresh2,
WB_Stop,
WB_get_Application,
WB_get_Parent,
WB_get_Container,
WB_get_Document,
WB_get_TopLevelContainer,
WB_get_Type,
WB_get_Left,
WB_put_Left,
WB_get_Top,
WB_put_Top,
WB_get_Width,
WB_put_Width,
WB_get_Height,
WB_put_Height,
WB_get_LocationName,
WB_get_LocationURL,
WB_get_Busy
};
IWebBrowserImpl SHDOCVW_WebBrowser = { &WB_Vtbl, 1 };

View File

@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = none
BOOKNAME = wine-doc
DB2HTML = $(SRCDIR)/db2html-winehq
DB2HTML = db2html
EXTRASUBDIRS = samples status

View File

@ -0,0 +1,100 @@
/*
* Defines the COM interfaces and APIs related to the IE Web browser control
*
* 2001 John R. Sheets (for CodeWeavers)
*/
#ifndef __WINE_WINE_OBJ_WEBBROWSER_H
#define __WINE_WINE_OBJ_WEBBROWSER_H
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
/*****************************************************************************
* Predeclare the interfaces and class IDs
*/
DEFINE_GUID(IID_IWebBrowser, 0xeab22ac1, 0x30c1, 0x11cf, 0xa7, 0xeb, 0x00, 0x00, 0xc0, 0x5b, 0xae, 0x0b);
typedef struct IWebBrowser IWebBrowser, *LPWEBBROWSER;
DEFINE_GUID(CLSID_WebBrowser, 0x8856f961, 0x340a, 0x11d0, 0xa9, 0x6b, 0x00, 0xc0, 0x4f, 0xd7, 0x05, 0xa2);
/*****************************************************************************
* IWebBrowser interface
*/
#define ICOM_INTERFACE IWebBrowser
#define IWebBrowser_METHODS \
ICOM_METHOD(HRESULT,GoBack) \
ICOM_METHOD(HRESULT,GoForward) \
ICOM_METHOD(HRESULT,GoHome) \
ICOM_METHOD(HRESULT,GoSearch) \
ICOM_METHOD5(HRESULT,Navigate, BSTR*,URL, VARIANT*,Flags, VARIANT*,TargetFrameName, \
VARIANT*,PostData, VARIANT*,Headers) \
ICOM_METHOD(HRESULT,Refresh) \
ICOM_METHOD1(HRESULT,Refresh2, VARIANT*,Level) \
ICOM_METHOD(HRESULT,Stop) \
ICOM_METHOD1(HRESULT,get_Application, void**,ppDisp) \
ICOM_METHOD1(HRESULT,get_Parent, void**,ppDisp) \
ICOM_METHOD1(HRESULT,get_Container, void**,ppDisp) \
ICOM_METHOD1(HRESULT,get_Document, void**,ppDisp) \
ICOM_METHOD1(HRESULT,get_TopLevelContainer, VARIANT*,pBool) \
ICOM_METHOD1(HRESULT,get_Type, BSTR*,Type) \
ICOM_METHOD1(HRESULT,get_Left, long*,pl) \
ICOM_METHOD1(HRESULT,put_Left, long,Left) \
ICOM_METHOD1(HRESULT,get_Top, long*,pl) \
ICOM_METHOD1(HRESULT,put_Top, long,Top) \
ICOM_METHOD1(HRESULT,get_Width, long*,pl) \
ICOM_METHOD1(HRESULT,put_Width, long,Width) \
ICOM_METHOD1(HRESULT,get_Height, long*,pl) \
ICOM_METHOD1(HRESULT,put_Height, long,Height) \
ICOM_METHOD1(HRESULT,get_LocationName, BSTR*,LocationName) \
ICOM_METHOD1(HRESULT,get_LocationURL, BSTR*,LocationURL) \
ICOM_METHOD1(HRESULT,get_Busy, VARIANT*,pBool)
#define IWebBrowser_IMETHODS \
IDispatch_METHODS \
IWebBrowser_METHODS
ICOM_DEFINE(IWebBrowser,IDispatch)
#undef ICOM_INTERFACE
/*** IUnknown methods ***/
#define IWebBrowser_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IWebBrowser_AddRef(p) ICOM_CALL (AddRef,p)
#define IWebBrowser_Release(p) ICOM_CALL (Release,p)
/*** IDispatch methods ***/
#define IWebBrowser_GetTypeInfoCount(p,a) ICOM_CALL1 (GetTypeInfoCount,p,a)
#define IWebBrowser_GetTypeInfo(p,a,b,c) ICOM_CALL3 (GetTypeInfo,p,a,b,c)
#define IWebBrowser_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
#define IWebBrowser_Invoke(p,a,b,c,d,e,f,g,h) ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
/*** IWebBrowserContainer methods ***/
#define IWebBrowser_GoBack(p,a) ICOM_CALL1(GoBack,p,a)
#define IWebBrowser_GoForward(p,a) ICOM_CALL1(GoForward,p,a)
#define IWebBrowser_GoHome(p,a) ICOM_CALL1(GoHome,p,a)
#define IWebBrowser_GoSearch(p,a) ICOM_CALL1(GoSearch,p,a)
#define IWebBrowser_Navigate(p,a) ICOM_CALL1(Navigate,p,a)
#define IWebBrowser_Refresh(p,a) ICOM_CALL1(Refresh,p,a)
#define IWebBrowser_Refresh2(p,a) ICOM_CALL1(Refresh2,p,a)
#define IWebBrowser_Stop(p,a) ICOM_CALL1(Stop,p,a)
#define IWebBrowser_get_Application(p,a) ICOM_CALL1(get_Application,p,a)
#define IWebBrowser_get_Parent(p,a) ICOM_CALL1(get_Parent,p,a)
#define IWebBrowser_get_Container(p,a) ICOM_CALL1(get_Container,p,a)
#define IWebBrowser_get_Document(p,a) ICOM_CALL1(get_Document,p,a)
#define IWebBrowser_get_TopLevelContainer(p,a) ICOM_CALL1(get_TopLevelContainer,p,a)
#define IWebBrowser_get_Type(p,a) ICOM_CALL1(get_Type,p,a)
#define IWebBrowser_get_Left(p,a) ICOM_CALL1(get_Left,p,a)
#define IWebBrowser_put_Left(p,a) ICOM_CALL1(put_Left,p,a)
#define IWebBrowser_get_Top(p,a) ICOM_CALL1(get_Top,p,a)
#define IWebBrowser_put_Top(p,a) ICOM_CALL1(put_Top,p,a)
#define IWebBrowser_get_Width(p,a) ICOM_CALL1(get_Width,p,a)
#define IWebBrowser_put_Width(p,a) ICOM_CALL1(put_Width,p,a)
#define IWebBrowser_get_Height(p,a) ICOM_CALL1(get_Height,p,a)
#define IWebBrowser_put_Height(p,a) ICOM_CALL1(put_Height,p,a)
#define IWebBrowser_get_LocationName(p,a) ICOM_CALL1(get_LocationName,p,a)
#define IWebBrowser_get_LocationURL(p,a) ICOM_CALL1(get_LocationURL,p,a)
#define IWebBrowser_get_Busy(p,a) ICOM_CALL1(get_Busy,p,a)
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif /* __WINE_WINE_OBJ_WEBBROWSER_H */

View File

@ -151,3 +151,24 @@
@="dsound.dll"
"ThreadingModel"="Both"
#
# Entries for IWebBrowser
# Used by Internet Explorer HTML-rendering control
#
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{8856f961-340a-11d0-a96b-00c04fd705a2}]
@="Shortcut"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{8856f961-340a-11d0-a96b-00c04fd705a2}\InProcServer32]
@="shdocvw.dll"
"ThreadingModel"="Apartment"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{8856f961-340a-11d0-a96b-00c04fd705a2}]
@="Shortcut"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{8856f961-340a-11d0-a96b-00c04fd705a2}\InProcServer32]
@="shdocvw.dll"
"ThreadingModel"="Apartment"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{8856f961-340a-11d0-a96b-00c04fd705a2}\shellex\MayChangeDefaultMenu]
@=""