Commit e747da44 authored by Hidenori Takeshima's avatar Hidenori Takeshima Committed by Alexandre Julliard

Implemented the basic COM framework.

Fixed all IUnknown of shdocvw.dll.
parent 89894ffc
......@@ -4,19 +4,17 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = shdocvw
EXTRALIBS = $(LIBUUID)
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
api.c \
browser.c \
comimpl.c \
connect.c \
shdocvw.c
@MAKE_DLL_RULES@
......
/*
* SHDOCVW - Internet Explorer Web Control
* SHDOCVW - Internet Explorer Web Control
* FIXME - stub
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
*
......@@ -20,7 +21,6 @@
#include <string.h>
#include "winreg.h"
#include "initguid.h"
#include "ole2.h"
#include "shlwapi.h"
......@@ -30,40 +30,12 @@
WINE_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;
return E_NOTIMPL;
}
/*************************************************************************
......@@ -71,9 +43,9 @@ HRESULT WINAPI SHDOCVW_DllGetVersion (DLLVERSIONINFO *pdvi)
*/
HRESULT WINAPI SHDOCVW_DllInstall(BOOL bInstall, LPCWSTR cmdline)
{
FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline));
FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline));
return S_OK;
return E_NOTIMPL;
}
/***********************************************************************
......@@ -82,7 +54,7 @@ HRESULT WINAPI SHDOCVW_DllInstall(BOOL bInstall, LPCWSTR cmdline)
HRESULT WINAPI SHDOCVW_DllRegisterServer()
{
FIXME("(), stub!\n");
return S_OK;
return E_NOTIMPL;
}
/***********************************************************************
......@@ -91,6 +63,5 @@ HRESULT WINAPI SHDOCVW_DllRegisterServer()
HRESULT WINAPI SHDOCVW_DllUnregisterServer()
{
FIXME("(), stub!\n");
return S_OK;
return E_NOTIMPL;
}
/*
* Implementation of IProvideClassInfo interfaces for IE Web Browser control
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <string.h>
#include "wine/debug.h"
#include "shdocvw.h"
WINE_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 };
/*
* A basic implementation for COM DLL implementor.
*
* Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef WINE_COMIMPL_H
#define WINE_COMIMPL_H
/*
This code provides a basic thread-safe COM implementation
including aggregation(and an IClassFactory implementation).
This code is based on my quartz code.
The usage of this library is:
1) copy comimpl.h and comimpl.c.
2) implement the global class entries 'COMIMPL_ClassList'.
3) export COMIMPL_DllMain, COMIMPL_DllGetClassObject and
COMIMPL_DllCanUnloadNow.
4) add 'comimpl' to your debug channels.
5) implement your IUnknown as a thunk to call
COMIMPL_IUnkImpl.punk methods.
6) provide pointers of vtables in constructor.
7) optionally, you can edit comimpl.h and/or comimpl.c.
A sample allocator of class COne that supports
two interface IOne and ITwo is:
const COMIMPL_CLASSENTRY COMIMPL_ClassList[] =
{
{ &CLSID_COne, &COne_AllocObj },
{ NULL, NULL } << the last entry must be NULL >>
};
typedef struct COne
{
COMIMPL_IUnkImpl vfunk; << must be the first member of this struct >>
struct { ICOM_VFIELD(IOne); } vfone;
struct { ICOM_VFIELD(ITwo); } vftwo;
<< ... >>
} COne;
#define COne_THIS(iface,member) COne* This = ((COne*)(((char*)iface)-offsetof(COne,member)))
static COMIMPL_IFEntry IFEntries[] =
{
<< all supported interfaces >>
{ &IID_IOne, offsetof(COne,vfone)-offsetof(COne,vfunk) },
{ &IID_ITwo, offsetof(COne,vftwo)-offsetof(COne,vfunk) },
};
static void COne_Destructor(IUnknown* iface)
{
COne_THIS(iface,vfunk);
<< ... implement destructor ... >>
}
HRESULT COne_AllocObj(IUnknown* punkOuter,void** ppobj)
{
COne* This;
This = (COne*)COMIMPL_AllocObj( sizeof(COne) );
if ( This == NULL ) return E_OUTOFMEMORY;
COMIMPL_IUnkInit( &This->vfunk, punkOuter );
This->vfunk.pEntries = IFEntries;
This->vfunk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
This->vfunk.pOnFinalRelease = COne_Destructor;
ICOM_VTBL(&This->vfone) = &ione;
ICOM_VTBL(&This->vftwo) = &itwo;
<< ... implement constructor ... >>
<< if error occurs in constructing, you can call simply
punk::Release() and return HRESULT. >>
*ppobj = (void*)(&This->vfunk);
return S_OK; << return S_OK if succeeded >>
}
*/
/* if per-thread initialization is needed, uncomment the following line */
/*#define COMIMPL_PERTHREAD_INIT*/
/* If an own heap is needed, customize the following line */
#define COMIMPL_hHeap GetProcessHeap()
typedef HRESULT (*COMIMPL_pCreateIUnknown)(IUnknown* punkOuter,void** ppobj);
typedef void (*COMIMPL_pOnFinalRelease)(IUnknown* punkInner);
typedef struct COMIMPL_IFEntry COMIMPL_IFEntry;
typedef struct COMIMPL_IFDelegation COMIMPL_IFDelegation;
typedef struct COMIMPL_IUnkImpl COMIMPL_IUnkImpl;
struct COMIMPL_IFEntry
{
const IID* piid; /* interface ID. */
size_t ofsVTPtr; /* offset from IUnknown. */
};
struct COMIMPL_IFDelegation
{
struct COMIMPL_IFDelegation* pNext;
HRESULT (*pOnQueryInterface)(
IUnknown* punk, const IID* piid, void** ppobj );
};
/* COMIMPL_IUnkimpl must be aligned for InterlockedExchangeAdd. */
#include <pshpack4.h>
struct COMIMPL_IUnkImpl
{
/* pointer of IUnknown interface. */
ICOM_VFIELD(IUnknown);
/* array of supported IIDs and offsets. */
const COMIMPL_IFEntry* pEntries;
DWORD dwEntries;
/* list of delegation handlers. */
COMIMPL_IFDelegation* pDelegationFirst;
/* called on final release. */
COMIMPL_pOnFinalRelease pOnFinalRelease;
/* IUnknown fields. */
LONG ref;
IUnknown* punkControl;
};
#include <poppack.h>
typedef struct COMIMPL_CLASSENTRY
{
const CLSID* pclsid;
COMIMPL_pCreateIUnknown pCreateIUnk;
} COMIMPL_CLASSENTRY;
extern const COMIMPL_CLASSENTRY COMIMPL_ClassList[]; /* must be provided */
void COMIMPL_IUnkInit( COMIMPL_IUnkImpl* pImpl, IUnknown* punkOuter );
void COMIMPL_IUnkAddDelegationHandler(
COMIMPL_IUnkImpl* pImpl, COMIMPL_IFDelegation* pDelegation );
BOOL WINAPI COMIMPL_DllMain(
HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved );
HRESULT WINAPI COMIMPL_DllGetClassObject(
const CLSID* pclsid,const IID* piid,void** ppv);
HRESULT WINAPI COMIMPL_DllCanUnloadNow(void);
void* COMIMPL_AllocObj( DWORD dwSize );
void COMIMPL_FreeObj( void* pobj ); /* for internal use only. */
#endif /* WINE_COMIMPL_H */
/*
* CConnectionPointImpl
* FIXME - stub
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
* Copyright 2002 Hidenori Takeshima
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <string.h>
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "ole2.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"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
#include "shdocvw.h"
typedef struct CConnectionPointImpl
{
COMIMPL_IUnkImpl vfunk; /* must be the first member of this struct */
struct { ICOM_VFIELD(IConnectionPoint); } vfcpoint;
/* CConnectionPointImpl variables */
} CConnectionPointImpl;
#define CConnectionPointImpl_THIS(iface,member) CConnectionPointImpl* This = ((CConnectionPointImpl*)(((char*)iface)-offsetof(CConnectionPointImpl,member)))
static COMIMPL_IFEntry IFEntries[] =
{
{ &IID_IConnectionPoint, offsetof(CConnectionPointImpl,vfcpoint)-offsetof(CConnectionPointImpl,vfunk) },
};
/***************************************************************************
*
* CConnectionPointImpl::IConnectionPoint
*/
/**********************************************************************
* Implement the IConnectionPoint interface
*/
static HRESULT WINAPI WBCP_QueryInterface(LPCONNECTIONPOINT iface,
REFIID riid, LPVOID *ppobj)
{
CConnectionPointImpl_THIS(iface,vfcpoint);
TRACE("(%p)->()\n",This);
return IUnknown_QueryInterface(This->vfunk.punkControl,riid,ppobj);
}
static ULONG WINAPI WBCP_AddRef(LPCONNECTIONPOINT iface)
{
CConnectionPointImpl_THIS(iface,vfcpoint);
TRACE("(%p)->()\n",This);
return IUnknown_AddRef(This->vfunk.punkControl);
}
static ULONG WINAPI WBCP_Release(LPCONNECTIONPOINT iface)
{
CConnectionPointImpl_THIS(iface,vfcpoint);
TRACE("(%p)->()\n",This);
return IUnknown_Release(This->vfunk.punkControl);
}
static HRESULT WINAPI WBCP_GetConnectionInterface(LPCONNECTIONPOINT iface, IID* pIId)
{
FIXME("stub: %s\n", debugstr_guid(pIId));
return E_NOTIMPL;
}
/* Get this connection point's owning container */
static HRESULT WINAPI
WBCP_GetConnectionPointContainer(LPCONNECTIONPOINT iface,
LPCONNECTIONPOINTCONTAINER *ppCPC)
{
FIXME("stub: IConnectionPointContainer = %p\n", *ppCPC);
return E_NOTIMPL;
}
/* 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)
{
FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink, *pdwCookie);
#if 0
static int new_cookie;
FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink, *pdwCookie);
*pdwCookie = ++new_cookie;
TRACE ("Returning cookie = %ld\n", *pdwCookie);
#endif
return E_NOTIMPL;
}
/* 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 E_NOTIMPL;
}
/* 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 E_NOTIMPL;
}
/**********************************************************************
* 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
};
/***************************************************************************
*
* new/delete CConnectionPointImpl
*
*/
static void CConnectionPointImpl_Destructor(IUnknown* iface)
{
CConnectionPointImpl_THIS(iface,vfunk);
FIXME("(%p)\n",This);
/* destructor */
}
HRESULT CConnectionPointImpl_AllocObj(IUnknown* punkOuter,void** ppobj)
{
CConnectionPointImpl* This;
This = (CConnectionPointImpl*)COMIMPL_AllocObj( sizeof(CConnectionPointImpl) );
if ( This == NULL ) return E_OUTOFMEMORY;
COMIMPL_IUnkInit( &This->vfunk, punkOuter );
This->vfunk.pEntries = IFEntries;
This->vfunk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
This->vfunk.pOnFinalRelease = CConnectionPointImpl_Destructor;
ICOM_VTBL(&This->vfcpoint) = &WBCP_Vtbl;
/* constructor */
return S_OK;
}
/*
* Implementation of event-related interfaces for IE Web Browser control:
*
* - IConnectionPointContainer
* - IConnectionPoint
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <string.h>
#include "wine/debug.h"
#include "shdocvw.h"
WINE_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 };
/*
* Implementation of class factory for IE Web Browser
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <string.h>
#include "wine/debug.h"
#include "shdocvw.h"
WINE_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 };
/*
* Implementation of miscellaneous interfaces for IE Web Browser control:
*
* - IQuickActivate
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "wine/debug.h"
#include "shdocvw.h"
WINE_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 };
/*
* Implementation of IPersist interfaces for IE Web Browser control
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "wine/debug.h"
#include "shdocvw.h"
WINE_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 };
/*
* The list of exported class.
*
* Copyright 2002 Hidenori Takeshima
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "ole2.h"
#include "oleauto.h"
#include "wine/obj_webbrowser.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
#include "shdocvw.h"
const COMIMPL_CLASSENTRY COMIMPL_ClassList[] =
{
{ &CLSID_WebBrowser, &CWebBrowserImpl_AllocObj },
{ NULL, NULL } /* the last entry must be NULL */
};
/*
* Header includes for shdocvw.dll
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
* Copyright 2002 Hidenori Takeshima
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,190 +17,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#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;
#ifndef WINE_SHDOCVW_H
#define WINE_SHDOCVW_H
extern IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2;
/**********************************************************************
* IPersistStorage declaration for SHDOCVW.DLL
*/
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IPersistStorage);
DWORD ref;
} IPersistStorageImpl;
#include "comimpl.h"
extern IPersistStorageImpl SHDOCVW_PersistStorage;
HRESULT CWebBrowserImpl_AllocObj(IUnknown* punkOuter,void** ppobj);
HRESULT CConnectionPointImpl_AllocObj(IUnknown* punkOuter,void** ppobj);
/**********************************************************************
* 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.. */
/* FIXME - move to header... */
DEFINE_GUID(IID_INotifyDBEvents,
0xdb526cc0, 0xd188, 0x11cd, 0xad, 0x48, 0x0, 0xaa, 0x0, 0x3c, 0x9c, 0xb6);
#endif /* __WINE_SHDOCVW_H */
#endif /* WINE_SHDOCVW_H */
name shdocvw
type win32
init COMIMPL_DllMain
import ole32.dll
import kernel32.dll
import ntdll.dll
debug_channels (shdocvw)
debug_channels (shdocvw comimpl)
108 stub AddUrlToFavorites
109 stdcall DllCanUnloadNow() SHDOCVW_DllCanUnloadNow
312 stdcall DllGetClassObject(long long ptr) SHDOCVW_DllGetClassObject
109 stdcall DllCanUnloadNow() COMIMPL_DllCanUnloadNow
312 stdcall DllGetClassObject(long long ptr) COMIMPL_DllGetClassObject
113 stdcall DllGetVersion(ptr) SHDOCVW_DllGetVersion
114 stdcall DllInstall(long wstr) SHDOCVW_DllInstall
124 stdcall DllRegisterServer() SHDOCVW_DllRegisterServer
......
/*
* Implementation of IWebBrowser interface for IE Web Browser control
*
* Copyright 2001 John R. Sheets (for CodeWeavers)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "wine/debug.h"
#include "shdocvw.h"
WINE_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 };
......@@ -64,6 +64,8 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
/* other GUIDs */
#include "wine/obj_webbrowser.h"
#include "vfw.h"
/* for dshow */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment