Commit in reactos on MAIN
baseaddress.cfg+2-11.29 -> 1.30
doc/README.WINE+11.25 -> 1.26
w32api/include/ocidl.h+11.4 -> 1.5
              /oleidl.h+11.2 -> 1.3
include/wine/guiddef.h+3-51.1 -> 1.2
lib/shdocvw/Makefile+9added 1.1
           /Makefile.in+25added 1.1
           /Makefile.ros-template+19added 1.1
           /classinfo.c+170added 1.1
           /events.c+212added 1.1
           /factory.c+121added 1.1
           /misc.c+93added 1.1
           /oleobject.c+615added 1.1
           /persist.c+198added 1.1
           /regsvr.c+551added 1.1
           /shdocvw.h+193added 1.1
           /shdocvw.rc+43added 1.1
           /shdocvw.spec+129added 1.1
           /shdocvw_main.c+553added 1.1
           /version.rc+27added 1.1
           /webbrowser.c+280added 1.1
           /winehq2ros.patch[empty]added 1.1
+3246-6
17 added + 5 modified, total 22 files
Import shdocvw from Wine

reactos
baseaddress.cfg 1.29 -> 1.30
diff -u -r1.29 -r1.30
--- baseaddress.cfg	20 Dec 2004 22:18:41 -0000	1.29
+++ baseaddress.cfg	23 Dec 2004 08:54:59 -0000	1.30
@@ -1,4 +1,4 @@
-# $Id: baseaddress.cfg,v 1.29 2004/12/20 22:18:41 greatlrd Exp $
+# $Id: baseaddress.cfg,v 1.30 2004/12/23 08:54:59 gvg Exp $
 #
 # Please try to keep this up2date. Please clean up
 # after yourself.
@@ -33,6 +33,7 @@
 TARGET_BASE_LIB_CARDS           =0x701a0000
 TARGET_BASE_LIB_WININET         =0x70200000
 TARGET_BASE_LIB_ACLUI           =0x71550000
+TARGET_BASE_LIB_SHDOCVW         =0x71700000
 TARGET_BASE_LIB_MSWSOCK         =0x71a30000
 TARGET_BASE_LIB_WSOCK32         =0x71ab0000
 TARGET_BASE_LIB_ACLEDIT         =0x71b70000

reactos/doc
README.WINE 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- README.WINE	22 Dec 2004 23:15:14 -0000	1.25
+++ README.WINE	23 Dec 2004 08:55:00 -0000	1.26
@@ -58,6 +58,7 @@
 reactos/lib/rpcrt4		# Synced to Wine-20041201
 reactos/lib/setupapi		# Out of sync
 reactos/lib/shell32             # Synced to Wine-20041201
+reactos/lib/shdocvw             # Synced to Wine-20041201
 reactos/lib/shlwapi             # Synced to Wine-20041201
 reactos/lib/twain		# Out of sync
 reactos/lib/unicode		# Dependancy on this lib needs to be removed. Synced to Wine-20041201

reactos/w32api/include
ocidl.h 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- ocidl.h	1 Dec 2004 20:06:15 -0000	1.4
+++ ocidl.h	23 Dec 2004 08:55:00 -0000	1.5
@@ -20,6 +20,7 @@
 typedef interface IFont *LPFONT;
 typedef interface IFontDisp *LPFONTDISP;
 typedef interface IOleUndoManager *LPOLEUNDOMANAGER;
+typedef interface IQuickActivate *LPQUICKACTIVATE;
 
 #ifndef OLE2ANSI
 typedef TEXTMETRICW TEXTMETRICOLE;

reactos/w32api/include
oleidl.h 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- oleidl.h	28 Feb 2004 20:14:33 -0000	1.2
+++ oleidl.h	23 Dec 2004 08:55:00 -0000	1.3
@@ -22,6 +22,7 @@
 typedef interface IEnumOLEVERB *LPENUMOLEVERB;
 typedef interface IOleWindow *LPOLEWINDOW;
 typedef interface IOleInPlaceUIWindow *LPOLEINPLACEUIWINDOW;
+typedef interface IOleInPlaceObject *LPOLEINPLACEOBJECT;
 typedef interface IOleInPlaceActiveObject *LPOLEINPLACEACTIVEOBJECT;
 typedef interface IOleInPlaceFrame *LPOLEINPLACEFRAME;
 typedef interface IOleAdviseHolder *LPOLEADVISEHOLDER;

reactos/include/wine
guiddef.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- guiddef.h	2 Jan 2004 19:49:44 -0000	1.1
+++ guiddef.h	23 Dec 2004 08:55:00 -0000	1.2
@@ -16,6 +16,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <basetyps.h>
+#include <objbase.h>
+
 #ifndef GUID_DEFINED
 #define GUID_DEFINED
 typedef struct _GUID
@@ -38,9 +41,6 @@
     extern const GUID name;
 #endif
 
-#define DEFINE_OLEGUID(name, l, w1, w2) \
-	DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
-
 #ifndef _GUIDDEF_H_
 #define _GUIDDEF_H_
 
@@ -68,8 +68,6 @@
 #else /* defined(__cplusplus) && !defined(CINTERFACE) */
 #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
 #endif /* defined(__cplusplus) && !defined(CINTERFACE) */
-#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
-#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
 
 #if defined(__cplusplus) && !defined(CINTERFACE)
 #include <string.h>

reactos/lib/shdocvw
Makefile added at 1.1
diff -N Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Makefile	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,9 @@
+# $Id: Makefile,v 1.1 2004/12/23 08:55:00 gvg Exp $
+
+PATH_TO_TOP = ../..
+
+TARGET_TYPE = winedll
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
\ No newline at end of file

reactos/lib/shdocvw
Makefile.in added at 1.1
diff -N Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Makefile.in	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,25 @@
+EXTRADEFS = -D_SHDOCVW_
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = shdocvw.dll
+IMPORTS   = urlmon ole32 user32 advapi32 kernel32
+EXTRALIBS = -luuid
+
+C_SRCS = \
+	classinfo.c \
+	events.c \
+	factory.c \
+	misc.c \
+	oleobject.c \
+	persist.c \
+	regsvr.c \
+	shdocvw_main.c \
+	webbrowser.c
+
+RC_SRCS = shdocvw.rc
+
+@MAKE_DLL_RULES@
+
+### Dependencies:

reactos/lib/shdocvw
Makefile.ros-template added at 1.1
diff -N Makefile.ros-template
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Makefile.ros-template	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,19 @@
+# $Id: Makefile.ros-template,v 1.1 2004/12/23 08:55:00 gvg Exp $
+
+TARGET_NAME = shdocvw
+
+TARGET_OBJECTS = @C_SRCS@
+
+TARGET_CFLAGS = @EXTRADEFS@
+
+TARGET_SDKLIBS = @IMPORTS@ wine.a wine_uuid.a ntdll.a
+
+TARGET_BASE = $(TARGET_BASE_LIB_SHDOCVW)
+
+TARGET_NORC = yes
+
+default: all
+
+DEP_OBJECTS = $(TARGET_OBJECTS)
+
+include $(TOOLS_PATH)/depend.mk

reactos/lib/shdocvw
classinfo.c added at 1.1
diff -N classinfo.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ classinfo.c	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,170 @@
+/*
+ * 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 <stdarg.h>
+#include <string.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "shdocvw.h"
+#include "wine/debug.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)
+{
+    IProvideClassInfoImpl *This = (IProvideClassInfoImpl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WBPCI_AddRef(LPPROVIDECLASSINFO iface)
+{
+    IProvideClassInfoImpl *This = (IProvideClassInfoImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WBPCI_Release(LPPROVIDECLASSINFO iface)
+{
+    IProvideClassInfoImpl *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 IProvideClassInfoVtbl WBPCI_Vtbl =
+{
+    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)
+{
+    IProvideClassInfo2Impl *This = (IProvideClassInfo2Impl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WBPCI2_AddRef(LPPROVIDECLASSINFO2 iface)
+{
+    IProvideClassInfo2Impl *This = (IProvideClassInfo2Impl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WBPCI2_Release(LPPROVIDECLASSINFO2 iface)
+{
+    IProvideClassInfo2Impl *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 implementation 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 IProvideClassInfo2Vtbl WBPCI2_Vtbl =
+{
+    WBPCI2_QueryInterface,
+    WBPCI2_AddRef,
+    WBPCI2_Release,
+    WBPCI2_GetClassInfo,
+    WBPCI2_GetGUID
+};
+
+IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2 = { &WBPCI2_Vtbl, 1 };

reactos/lib/shdocvw
events.c added at 1.1
diff -N events.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ events.c	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,212 @@
+/*
+ * 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);
+
+
+static const GUID IID_INotifyDBEvents =
+    { 0xdb526cc0, 0xd188, 0x11cd, { 0xad, 0x48, 0x00, 0xaa, 0x00, 0x3c, 0x9c, 0xb6 } };
+
+/**********************************************************************
+ * Implement the IConnectionPointContainer interface
+ */
+
+static HRESULT WINAPI WBCPC_QueryInterface(LPCONNECTIONPOINTCONTAINER iface,
+                                           REFIID riid, LPVOID *ppobj)
+{
+    IConnectionPointContainerImpl *This = (IConnectionPointContainerImpl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WBCPC_AddRef(LPCONNECTIONPOINTCONTAINER iface)
+{
+    IConnectionPointContainerImpl *This = (IConnectionPointContainerImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WBCPC_Release(LPCONNECTIONPOINTCONTAINER iface)
+{
+    IConnectionPointContainerImpl *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 IConnectionPointContainerVtbl WBCPC_Vtbl =
+{
+    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)
+{
+    IConnectionPointImpl *This = (IConnectionPointImpl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WBCP_AddRef(LPCONNECTIONPOINT iface)
+{
+    IConnectionPointImpl *This = (IConnectionPointImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WBCP_Release(LPCONNECTIONPOINT iface)
+{
+    IConnectionPointImpl *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 = %lx\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 IConnectionPointVtbl WBCP_Vtbl =
+{
+    WBCP_QueryInterface,
+    WBCP_AddRef,
+    WBCP_Release,
+    WBCP_GetConnectionInterface,
+    WBCP_GetConnectionPointContainer,
+    WBCP_Advise,
+    WBCP_Unadvise,
+    WBCP_EnumConnections
+};
+
+IConnectionPointImpl SHDOCVW_ConnectionPoint = { &WBCP_Vtbl, 1 };

reactos/lib/shdocvw
factory.c added at 1.1
diff -N factory.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ factory.c	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,121 @@
+/*
+ * 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)
+{
+    IClassFactoryImpl *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)
+{
+    IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+/************************************************************************
+ * WBCF_Release (IUnknown)
+ */
+static ULONG WINAPI WBCF_Release(LPCLASSFACTORY iface)
+{
+    IClassFactoryImpl *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)
+{
+    IClassFactoryImpl *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)
+{
+    IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
+    FIXME("(%p)->(%d),stub!\n", This, dolock);
+    return S_OK;
+}
+
+static IClassFactoryVtbl WBCF_Vtbl =
+{
+    WBCF_QueryInterface,
+    WBCF_AddRef,
+    WBCF_Release,
+    WBCF_CreateInstance,
+    WBCF_LockServer
+};
+
+IClassFactoryImpl SHDOCVW_ClassFactory = { &WBCF_Vtbl, 1 };

reactos/lib/shdocvw
misc.c added at 1.1
diff -N misc.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ misc.c	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,93 @@
+/*
+ * 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)
+{
+    IQuickActivateImpl *This = (IQuickActivateImpl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WBQA_AddRef(LPQUICKACTIVATE iface)
+{
+    IQuickActivateImpl *This = (IQuickActivateImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WBQA_Release(LPQUICKACTIVATE iface)
+{
+    IQuickActivateImpl *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 IQuickActivateVtbl WBQA_Vtbl =
+{
+    WBQA_QueryInterface,
+    WBQA_AddRef,
+    WBQA_Release,
+    WBQA_QuickActivate,
+    WBQA_SetContentExtent,
+    WBQA_GetContentExtent
+};
+
+IQuickActivateImpl SHDOCVW_QuickActivate = { &WBQA_Vtbl, 1 };

reactos/lib/shdocvw
oleobject.c added at 1.1
diff -N oleobject.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ oleobject.c	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,615 @@
+/*
+ * Implementation of IOleObject interfaces for IE Web Browser
+ *
+ * - IOleObject
+ * - IOleInPlaceObject
+ * - IOleControl
+ *
+ * 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"
+#include "ole2.h"
+
+WINE_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)
+{
+    IOleObjectImpl *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)
+{
+    IOleObjectImpl *This = (IOleObjectImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+/************************************************************************
+ * WBOOBJ_Release (IUnknown)
+ */
+static ULONG WINAPI WBOOBJ_Release(LPOLEOBJECT iface)
+{
+    IOleObjectImpl *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_FAIL;
+}
+
+/************************************************************************
+ * 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 IOleObjectVtbl WBOOBJ_Vtbl =
+{
+    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)
+{
+    IOleInPlaceObjectImpl *This = (IOleInPlaceObjectImpl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WBOIPO_AddRef(LPOLEINPLACEOBJECT iface)
+{
+    IOleInPlaceObjectImpl *This = (IOleInPlaceObjectImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WBOIPO_Release(LPOLEINPLACEOBJECT iface)
+{
+    IOleInPlaceObjectImpl *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 IOleInPlaceObjectVtbl WBOIPO_Vtbl =
+{
+    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)
+{
+    IOleControlImpl *This = (IOleControlImpl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WBOC_AddRef(LPOLECONTROL iface)
+{
+    IOleControlImpl *This = (IOleControlImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WBOC_Release(LPOLECONTROL iface)
+{
+    IOleControlImpl *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 IOleControlVtbl WBOC_Vtbl =
+{
+    WBOC_QueryInterface,
+    WBOC_AddRef,
+    WBOC_Release,
+    WBOC_GetControlInfo,
+    WBOC_OnMnemonic,
+    WBOC_OnAmbientPropertyChange,
+    WBOC_FreezeEvents
+};
+
+IOleControlImpl SHDOCVW_OleControl = { &WBOC_Vtbl, 1 };

reactos/lib/shdocvw
persist.c added at 1.1
diff -N persist.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ persist.c	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,198 @@
+/*
+ * 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)
+{
+    IPersistStorageImpl *This = (IPersistStorageImpl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WBPS_AddRef(LPPERSISTSTORAGE iface)
+{
+    IPersistStorageImpl *This = (IPersistStorageImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WBPS_Release(LPPERSISTSTORAGE iface)
+{
+    IPersistStorageImpl *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 IPersistStorageVtbl WBPS_Vtbl =
+{
+    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)
+{
+    IPersistStreamInitImpl *This = (IPersistStreamInitImpl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WBPSI_AddRef(LPPERSISTSTREAMINIT iface)
+{
+    IPersistStreamInitImpl *This = (IPersistStreamInitImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WBPSI_Release(LPPERSISTSTREAMINIT iface)
+{
+    IPersistStreamInitImpl *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 IPersistStreamInitVtbl WBPSI_Vtbl =
+{
+    WBPSI_QueryInterface,
+    WBPSI_AddRef,
+    WBPSI_Release,
+    WBPSI_GetClassID,
+    WBPSI_IsDirty,
+    WBPSI_Load,
+    WBPSI_Save,
+    WBPSI_GetSizeMax,
+    WBPSI_InitNew
+};
+
+IPersistStreamInitImpl SHDOCVW_PersistStreamInit = { &WBPSI_Vtbl, 1 };

reactos/lib/shdocvw
regsvr.c added at 1.1
diff -N regsvr.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ regsvr.c	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,551 @@
+/*
+ *	self-registerable dll functions for shdocvw.dll
+ *
+ * Copyright (C) 2003 John K. Hohm
+ *
+ * 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 <stdarg.h>
+#include <string.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winreg.h"
+#include "winerror.h"
+
+#include "shdocvw.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
+
+/*
+ * Near the bottom of this file are the exported DllRegisterServer and
+ * DllUnregisterServer, which make all this worthwhile.
+ */
+
+/***********************************************************************
+ *		interface for self-registering
+ */
+struct regsvr_interface
+{
+    IID const *iid;		/* NULL for end of list */
+    LPCSTR name;		/* can be NULL to omit */
+    IID const *base_iid;	/* can be NULL to omit */
+    int num_methods;		/* can be <0 to omit */
+    CLSID const *ps_clsid;	/* can be NULL to omit */
+    CLSID const *ps_clsid32;	/* can be NULL to omit */
+};
+
+static HRESULT register_interfaces(struct regsvr_interface const *list);
+static HRESULT unregister_interfaces(struct regsvr_interface const *list);
+
+struct regsvr_coclass
+{
+    CLSID const *clsid;		/* NULL for end of list */
+    LPCSTR name;		/* can be NULL to omit */
+    LPCSTR ips;			/* can be NULL to omit */
+    LPCSTR ips32;		/* can be NULL to omit */
+    LPCSTR ips32_tmodel;	/* can be NULL to omit */
+    LPCSTR progid;		/* can be NULL to omit */
+    LPCSTR viprogid;		/* can be NULL to omit */
+    LPCSTR progid_extra;	/* can be NULL to omit */
+};
+
+static HRESULT register_coclasses(struct regsvr_coclass const *list);
+static HRESULT unregister_coclasses(struct regsvr_coclass const *list);
+
+/***********************************************************************
+ *		static string constants
+ */
+static WCHAR const interface_keyname[10] = {
+    'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 };
+static WCHAR const base_ifa_keyname[14] = {
+    'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c',
+    'e', 0 };
+static WCHAR const num_methods_keyname[11] = {
+    'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 };
+static WCHAR const ps_clsid_keyname[15] = {
+    'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
+    'i', 'd', 0 };
+static WCHAR const ps_clsid32_keyname[17] = {
+    'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
+    'i', 'd', '3', '2', 0 };
+static WCHAR const clsid_keyname[6] = {
+    'C', 'L', 'S', 'I', 'D', 0 };
+static WCHAR const curver_keyname[7] = {
+    'C', 'u', 'r', 'V', 'e', 'r', 0 };
+static WCHAR const ips_keyname[13] = {
+    'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
+    0 };
+static WCHAR const ips32_keyname[15] = {
+    'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
+    '3', '2', 0 };
+static WCHAR const progid_keyname[7] = {
+    'P', 'r', 'o', 'g', 'I', 'D', 0 };
+static WCHAR const viprogid_keyname[25] = {
+    'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p',
+    'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D',
+    0 };
+static char const tmodel_valuename[] = "ThreadingModel";
+
+/***********************************************************************
+ *		static helper functions
+ */
+static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid);
+static LONG register_key_defvalueW(HKEY base, WCHAR const *name,
+				   WCHAR const *value);
+static LONG register_key_defvalueA(HKEY base, WCHAR const *name,
+				   char const *value);
+static LONG register_progid(WCHAR const *clsid,
+			    char const *progid, char const *curver_progid,
+			    char const *name, char const *extra);
+static LONG recursive_delete_key(HKEY key);
+static LONG recursive_delete_keyA(HKEY base, char const *name);
+static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
+
+/***********************************************************************
+ *		register_interfaces
+ */
+static HRESULT register_interfaces(struct regsvr_interface const *list)
+{
+    LONG res = ERROR_SUCCESS;
+    HKEY interface_key;
+
+    res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0,
+			  KEY_READ | KEY_WRITE, NULL, &interface_key, NULL);
+    if (res != ERROR_SUCCESS) goto error_return;
+
+    for (; res == ERROR_SUCCESS && list->iid; ++list) {
+	WCHAR buf[39];
+	HKEY iid_key;
+
+	StringFromGUID2(list->iid, buf, 39);
+	res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0,
+			      KEY_READ | KEY_WRITE, NULL, &iid_key, NULL);
+	if (res != ERROR_SUCCESS) goto error_close_interface_key;
+
+	if (list->name) {
+	    res = RegSetValueExA(iid_key, NULL, 0, REG_SZ,
+				 (CONST BYTE*)(list->name),
+				 strlen(list->name) + 1);
+	    if (res != ERROR_SUCCESS) goto error_close_iid_key;
+	}
+
+	if (list->base_iid) {
+	    register_key_guid(iid_key, base_ifa_keyname, list->base_iid);
+	    if (res != ERROR_SUCCESS) goto error_close_iid_key;
+	}
+
+	if (0 <= list->num_methods) {
+	    static WCHAR const fmt[3] = { '%', 'd', 0 };
+	    HKEY key;
+
+	    res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0,
+				  KEY_READ | KEY_WRITE, NULL, &key, NULL);
+	    if (res != ERROR_SUCCESS) goto error_close_iid_key;
+
+	    wsprintfW(buf, fmt, list->num_methods);
+	    res = RegSetValueExW(key, NULL, 0, REG_SZ,
+				 (CONST BYTE*)buf,
+				 (lstrlenW(buf) + 1) * sizeof(WCHAR));
+	    RegCloseKey(key);
+
+	    if (res != ERROR_SUCCESS) goto error_close_iid_key;
+	}
+
+	if (list->ps_clsid) {
+	    register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid);
+	    if (res != ERROR_SUCCESS) goto error_close_iid_key;
+	}
+
+	if (list->ps_clsid32) {
+	    register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32);
+	    if (res != ERROR_SUCCESS) goto error_close_iid_key;
+	}
+
+    error_close_iid_key:
+	RegCloseKey(iid_key);
+    }
+
+error_close_interface_key:
+    RegCloseKey(interface_key);
+error_return:
+    return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
+}
+
+/***********************************************************************
+ *		unregister_interfaces
+ */
+static HRESULT unregister_interfaces(struct regsvr_interface const *list)
+{
+    LONG res = ERROR_SUCCESS;
+    HKEY interface_key;
+
+    res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0,
+			KEY_READ | KEY_WRITE, &interface_key);
+    if (res == ERROR_FILE_NOT_FOUND) return S_OK;
+    if (res != ERROR_SUCCESS) goto error_return;
+
+    for (; res == ERROR_SUCCESS && list->iid; ++list) {
+	WCHAR buf[39];
+
+	StringFromGUID2(list->iid, buf, 39);
+	res = recursive_delete_keyW(interface_key, buf);
+    }
+
+    RegCloseKey(interface_key);
+error_return:
+    return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
+}
+
+/***********************************************************************
+ *		register_coclasses
+ */
+static HRESULT register_coclasses(struct regsvr_coclass const *list)
+{
+    LONG res = ERROR_SUCCESS;
+    HKEY coclass_key;
+
+    res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0,
+			  KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
+    if (res != ERROR_SUCCESS) goto error_return;
+
+    for (; res == ERROR_SUCCESS && list->clsid; ++list) {
+	WCHAR buf[39];
+	HKEY clsid_key;
+
+	StringFromGUID2(list->clsid, buf, 39);
+	res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
+			      KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
+	if (res != ERROR_SUCCESS) goto error_close_coclass_key;
+
+	if (list->name) {
+	    res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ,
+				 (CONST BYTE*)(list->name),
+				 strlen(list->name) + 1);
+	    if (res != ERROR_SUCCESS) goto error_close_clsid_key;
+	}
+
+	if (list->ips) {
+	    res = register_key_defvalueA(clsid_key, ips_keyname, list->ips);
+	    if (res != ERROR_SUCCESS) goto error_close_clsid_key;
+	}
+
+	if (list->ips32) {
+	    HKEY ips32_key;
+
+	    res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0,
+				  KEY_READ | KEY_WRITE, NULL,
+				  &ips32_key, NULL);
+	    if (res != ERROR_SUCCESS) goto error_close_clsid_key;
+
+	    res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ,
+				 (CONST BYTE*)list->ips32,
+				 lstrlenA(list->ips32) + 1);
+	    if (res == ERROR_SUCCESS && list->ips32_tmodel)
+		res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ,
+				     (CONST BYTE*)list->ips32_tmodel,
+				     strlen(list->ips32_tmodel) + 1);
+	    RegCloseKey(ips32_key);
+	    if (res != ERROR_SUCCESS) goto error_close_clsid_key;
+	}
+
+	if (list->progid) {
+	    res = register_key_defvalueA(clsid_key, progid_keyname,
+					 list->progid);
+	    if (res != ERROR_SUCCESS) goto error_close_clsid_key;
+
+	    res = register_progid(buf, list->progid, NULL,
+				  list->name, list->progid_extra);
+	    if (res != ERROR_SUCCESS) goto error_close_clsid_key;
+	}
+
+	if (list->viprogid) {
+	    res = register_key_defvalueA(clsid_key, viprogid_keyname,
+					 list->viprogid);
+	    if (res != ERROR_SUCCESS) goto error_close_clsid_key;
+
+	    res = register_progid(buf, list->viprogid, list->progid,
+				  list->name, list->progid_extra);
+	    if (res != ERROR_SUCCESS) goto error_close_clsid_key;
+	}
+
+    error_close_clsid_key:
+	RegCloseKey(clsid_key);
+    }
+
+error_close_coclass_key:
+    RegCloseKey(coclass_key);
+error_return:
+    return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
+}
+
+/***********************************************************************
+ *		unregister_coclasses
+ */
+static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
+{
+    LONG res = ERROR_SUCCESS;
+    HKEY coclass_key;
+
+    res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0,
+			KEY_READ | KEY_WRITE, &coclass_key);
+    if (res == ERROR_FILE_NOT_FOUND) return S_OK;
+    if (res != ERROR_SUCCESS) goto error_return;
+
+    for (; res == ERROR_SUCCESS && list->clsid; ++list) {
+	WCHAR buf[39];
+
+	StringFromGUID2(list->clsid, buf, 39);
+	res = recursive_delete_keyW(coclass_key, buf);
+	if (res != ERROR_SUCCESS) goto error_close_coclass_key;
+
+	if (list->progid) {
+	    res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid);
+	    if (res != ERROR_SUCCESS) goto error_close_coclass_key;
+	}
+
+	if (list->viprogid) {
+	    res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid);
+	    if (res != ERROR_SUCCESS) goto error_close_coclass_key;
+	}
+    }
+
+error_close_coclass_key:
+    RegCloseKey(coclass_key);
+error_return:
+    return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
+}
+
+/***********************************************************************
+ *		regsvr_key_guid
+ */
+static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
+{
+    WCHAR buf[39];
+
+    StringFromGUID2(guid, buf, 39);
+    return register_key_defvalueW(base, name, buf);
+}
+
+/***********************************************************************
+ *		regsvr_key_defvalueW
+ */
+static LONG register_key_defvalueW(
+    HKEY base,
+    WCHAR const *name,
+    WCHAR const *value)
+{
+    LONG res;
+    HKEY key;
+
+    res = RegCreateKeyExW(base, name, 0, NULL, 0,
+			  KEY_READ | KEY_WRITE, NULL, &key, NULL);
+    if (res != ERROR_SUCCESS) return res;
+    res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
+			 (lstrlenW(value) + 1) * sizeof(WCHAR));
+    RegCloseKey(key);
+    return res;
+}
+
+/***********************************************************************
+ *		regsvr_key_defvalueA
+ */
+static LONG register_key_defvalueA(
+    HKEY base,
+    WCHAR const *name,
+    char const *value)
+{
+    LONG res;
+    HKEY key;
+
+    res = RegCreateKeyExW(base, name, 0, NULL, 0,
+			  KEY_READ | KEY_WRITE, NULL, &key, NULL);
+    if (res != ERROR_SUCCESS) return res;
+    res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
+			 lstrlenA(value) + 1);
+    RegCloseKey(key);
+    return res;
+}
+
+/***********************************************************************
+ *		regsvr_progid
+ */
+static LONG register_progid(
+    WCHAR const *clsid,
+    char const *progid,
+    char const *curver_progid,
+    char const *name,
+    char const *extra)
+{
+    LONG res;
+    HKEY progid_key;
+
+    res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0,
+			  NULL, 0, KEY_READ | KEY_WRITE, NULL,
+			  &progid_key, NULL);
+    if (res != ERROR_SUCCESS) return res;
+
+    if (name) {
+	res = RegSetValueExA(progid_key, NULL, 0, REG_SZ,
+			     (CONST BYTE*)name, strlen(name) + 1);
+	if (res != ERROR_SUCCESS) goto error_close_progid_key;
+    }
+
+    if (clsid) {
+	res = register_key_defvalueW(progid_key, clsid_keyname, clsid);
+	if (res != ERROR_SUCCESS) goto error_close_progid_key;
+    }
+
+    if (curver_progid) {
+	res = register_key_defvalueA(progid_key, curver_keyname,
+				     curver_progid);
+	if (res != ERROR_SUCCESS) goto error_close_progid_key;
+    }
+
+    if (extra) {
+	HKEY extra_key;
+
+	res = RegCreateKeyExA(progid_key, extra, 0,
+			      NULL, 0, KEY_READ | KEY_WRITE, NULL,
+			      &extra_key, NULL);
+	if (res == ERROR_SUCCESS)
+	    RegCloseKey(extra_key);
+    }
+
+error_close_progid_key:
+    RegCloseKey(progid_key);
+    return res;
+}
+
+/***********************************************************************
+ *		recursive_delete_key
+ */
+static LONG recursive_delete_key(HKEY key)
+{
+    LONG res;
+    WCHAR subkey_name[MAX_PATH];
+    DWORD cName;
+    HKEY subkey;
+
+    for (;;) {
+	cName = sizeof(subkey_name) / sizeof(WCHAR);
+	res = RegEnumKeyExW(key, 0, subkey_name, &cName,
+			    NULL, NULL, NULL, NULL);
+	if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) {
+	    res = ERROR_SUCCESS; /* presumably we're done enumerating */
+	    break;
+	}
+	res = RegOpenKeyExW(key, subkey_name, 0,
+			    KEY_READ | KEY_WRITE, &subkey);
+	if (res == ERROR_FILE_NOT_FOUND) continue;
+	if (res != ERROR_SUCCESS) break;
+
+	res = recursive_delete_key(subkey);
+	RegCloseKey(subkey);
+	if (res != ERROR_SUCCESS) break;
+    }
+
+    if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0);
+    return res;
+}
+
+/***********************************************************************
+ *		recursive_delete_keyA
+ */
+static LONG recursive_delete_keyA(HKEY base, char const *name)
+{
+    LONG res;
+    HKEY key;
+
+    res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key);
+    if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
+    if (res != ERROR_SUCCESS) return res;
+    res = recursive_delete_key(key);
+    RegCloseKey(key);
+    return res;
+}
+
+/***********************************************************************
+ *		recursive_delete_keyW
+ */
+static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
+{
+    LONG res;
+    HKEY key;
+
+    res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key);
+    if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
+    if (res != ERROR_SUCCESS) return res;
+    res = recursive_delete_key(key);
+    RegCloseKey(key);
+    return res;
+}
+
+/***********************************************************************
+ *		coclass list
+ */
+static struct regsvr_coclass const coclass_list[] = {
+    {   &CLSID_WebBrowser,
+	"Microsoft Web Browser",
+	NULL,
+	"shdocvw.dll",
+	"Apartment",
+	"Shell.Explorer.2",
+	"Shell.Explorer"
+    },
+    { NULL }			/* list terminator */
+};
+
+/***********************************************************************
+ *		interface list
+ */
+
+static struct regsvr_interface const interface_list[] = {
+    { NULL }			/* list terminator */
+};
+
+/***********************************************************************
+ *		DllRegisterServer (SHDOCVW.@)
+ */
+HRESULT WINAPI SHDOCVW_DllRegisterServer(void)
+{
+    HRESULT hr;
+
+    TRACE("\n");
+
+    hr = register_coclasses(coclass_list);
+    if (SUCCEEDED(hr))
+	hr = register_interfaces(interface_list);
+    return hr;
+}
+
+/***********************************************************************
+ *		DllUnregisterServer (SHDOCVW.@)
+ */
+HRESULT WINAPI SHDOCVW_DllUnregisterServer(void)
+{
+    HRESULT hr;
+
+    TRACE("\n");
+
+    hr = unregister_coclasses(coclass_list);
+    if (SUCCEEDED(hr))
+	hr = unregister_interfaces(interface_list);
+    return hr;
+}

reactos/lib/shdocvw
shdocvw.h added at 1.1
diff -N shdocvw.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ shdocvw.h	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,193 @@
+/*
+ * Header includes for shdocvw.dll
+ *
+ * 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
+ */
+
+#ifndef __WINE_SHDOCVW_H
+#define __WINE_SHDOCVW_H
+
+#define COM_NO_WINDOWS_H
+/* FIXME: Is there a better way to deal with all these includes? */
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+
+#include "ole2.h"
+#include "olectl.h"
+#include "shlobj.h"
+#include "exdisp.h"
+
+/**********************************************************************
+ * IClassFactory declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IClassFactoryVtbl *lpVtbl;
+    DWORD ref;
+} IClassFactoryImpl;
+
+extern IClassFactoryImpl SHDOCVW_ClassFactory;
+
+
+/**********************************************************************
+ * IOleObject declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IOleObjectVtbl *lpVtbl;
+    DWORD ref;
+} IOleObjectImpl;
+
+extern IOleObjectImpl SHDOCVW_OleObject;
+
+
+/**********************************************************************
+ * IOleInPlaceObject declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IOleInPlaceObjectVtbl *lpVtbl;
+    DWORD ref;
+} IOleInPlaceObjectImpl;
+
+extern IOleInPlaceObjectImpl SHDOCVW_OleInPlaceObject;
+
+
+/**********************************************************************
+ * IOleControl declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IOleControlVtbl *lpVtbl;
+    DWORD ref;
+} IOleControlImpl;
+
+extern IOleControlImpl SHDOCVW_OleControl;
+
+
+/**********************************************************************
+ * IWebBrowser declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IWebBrowserVtbl *lpVtbl;
+    DWORD ref;
+} IWebBrowserImpl;
+
+extern IWebBrowserImpl SHDOCVW_WebBrowser;
+
+
+/**********************************************************************
+ * IProvideClassInfo declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IProvideClassInfoVtbl *lpVtbl;
+    DWORD ref;
+} IProvideClassInfoImpl;
+
+extern IProvideClassInfoImpl SHDOCVW_ProvideClassInfo;
+
+
+/**********************************************************************
+ * IProvideClassInfo2 declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IProvideClassInfo2Vtbl *lpVtbl;
+    DWORD ref;
+} IProvideClassInfo2Impl;
+
+extern IProvideClassInfo2Impl SHDOCVW_ProvideClassInfo2;
+
+
+/**********************************************************************
+ * IPersistStorage declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IPersistStorageVtbl *lpVtbl;
+    DWORD ref;
+} IPersistStorageImpl;
+
+extern IPersistStorageImpl SHDOCVW_PersistStorage;
+
+
+/**********************************************************************
+ * IPersistStreamInit declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IPersistStreamInitVtbl *lpVtbl;
+    DWORD ref;
+} IPersistStreamInitImpl;
+
+extern IPersistStreamInitImpl SHDOCVW_PersistStreamInit;
+
+
+/**********************************************************************
+ * IQuickActivate declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IQuickActivateVtbl *lpVtbl;
+    DWORD ref;
+} IQuickActivateImpl;
+
+extern IQuickActivateImpl SHDOCVW_QuickActivate;
+
+
+/**********************************************************************
+ * IConnectionPointContainer declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IConnectionPointContainerVtbl *lpVtbl;
+    DWORD ref;
+} IConnectionPointContainerImpl;
+
+extern IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer;
+
+
+/**********************************************************************
+ * IConnectionPoint declaration for SHDOCVW.DLL
+ */
+typedef struct
+{
+    /* IUnknown fields */
+    IConnectionPointVtbl *lpVtbl;
+    DWORD ref;
+} IConnectionPointImpl;
+
+extern IConnectionPointImpl SHDOCVW_ConnectionPoint;
+
+#endif /* __WINE_SHDOCVW_H */

reactos/lib/shdocvw
shdocvw.rc added at 1.1
diff -N shdocvw.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ shdocvw.rc	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004 Mike McCormack 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 "windef.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "commctrl.h"
+
+#include "version.rc"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+100 DIALOG LOADONCALL MOVEABLE DISCARDABLE  0, 0, 220, 62
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Downloading the Mozilla Active X control"
+FONT 8, "Helv"
+{
+ CONTROL "Progress1",1000,"msctls_progress32",WS_BORDER|PBS_SMOOTH,10,10,200,12
+ LTEXT "", 104, 10, 30, 200, 10, SS_CENTER
+ PUSHBUTTON "Cancel", IDCANCEL, 85, 44, 50, 15, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE
+BEGIN
+ 1001	"This application is requesting an ActiveX browser object\n" \
+        "but the Mozilla Active X control is currently not installed." \
+        "Do you wish to download and install it?"
+END

reactos/lib/shdocvw
shdocvw.spec added at 1.1
diff -N shdocvw.spec
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ shdocvw.spec	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,129 @@
+# ordinal exports
+101 stub -noname IEWinMain
+102 stub -noname CreateShortcutInDirA
+103 stub -noname CreateShortcutInDirW
+104 stub -noname WhichPlatformFORWARD
+105 stub -noname CreateShortcutInDirEx
+106 stub HlinkFindFrame
+107 stub SetShellOfflineState
+108 stub AddUrlToFavorites
+110 stdcall -noname WinList_Init()
+111 stub -noname WinList_Terminate
+115 stub -noname CreateFromDesktop
+116 stub -noname DDECreatePostNotify
+117 stub -noname DDEHandleViewFolderNotify
+@ stub IEAboutBox
+118 stdcall -noname ShellDDEInit(long)
+119 stub -noname SHCreateDesktop
+120 stub -noname SHDesktopMessageLoop
+121 stub -noname StopWatchModeFORWARD
+122 stub -noname StopWatchFlushFORWARD
+123 stub -noname StopWatchFORWARD
+125 stdcall -noname RunInstallUninstallStubs()
+130 stub -noname RunInstallUninstallStubs2
+131 stub -noname SHCreateSplashScreen
+135 stub -noname IsFileUrl
+136 stub -noname IsFileUrlW
+137 stub -noname PathIsFilePath
+138 stub -noname URLSubLoadString
+139 stub -noname OpenPidlOrderStream
+140 stub -noname DragDrop
+141 stub -noname IEInvalidateImageList
+142 stub -noname IEMapPIDLToSystemImageListIndex
+143 stub -noname ILIsWeb
+145 stub -noname IEGetAttributesOf
+146 stub -noname IEBindToObject
+147 stub -noname IEGetNameAndFlags
+148 stub -noname IEGetDisplayName
+149 stub -noname IEBindToObjectEx
+150 stub -noname _GetStdLocation
+151 stub -noname URLSubRegQueryA
+152 stub -noname CShellUIHelper_CreateInstance2
+153 stub -noname IsURLChild
+158 stub -noname SHRestricted2A
+159 stub -noname SHRestricted2W
+160 stub -noname SHIsRestricted2W
+161 stub @ # CSearchAssistantOC::OnDraw
+162 stub -noname CDDEAuto_Navigate
+163 stub SHAddSubscribeFavorite
+164 stub -noname ResetProfileSharing
+165 stub -noname URLSubstitution
+167 stub -noname IsIEDefaultBrowser
+169 stub -noname ParseURLFromOutsideSourceA
+170 stub -noname ParseURLFromOutsideSourceW
+171 stub -noname _DeletePidlDPA
+172 stub -noname IURLQualify
+173 stub -noname SHIsRestricted
+174 stub -noname SHIsGlobalOffline
+175 stub -noname DetectAndFixAssociations
+176 stub -noname EnsureWebViewRegSettings
+177 stub -noname WinList_NotifyNewLocation
+178 stub -noname WinList_FindFolderWindow
+179 stub -noname WinList_GetShellWindows
+180 stub -noname WinList_RegisterPending
+181 stub -noname WinList_Revoke
+183 stub -noname SHMapNbspToSp
+185 stub -noname FireEvent_Quit
+187 stub -noname SHDGetPageLocation
+188 stub -noname SHIEErrorMsgBox
+189 stub -noname IEGetDisplayName
+190 stub -noname SHRunIndirectRegClientCommandForward
+191 stub -noname SHIsRegisteredClient
+192 stub -noname SHGetHistoryPIDL
+194 stub -noname IECleanUpAutomationObject
+195 stub -noname IEOnFirstBrowserCreation
+196 stub -noname IEDDE_WindowDestroyed
+197 stub -noname IEDDE_NewWindow
+198 stub -noname IsErrorUrl
+199 stub @
+200 stub -noname SHGetViewStream
+203 stub -noname NavToUrlUsingIEA
+204 stub -noname NavToUrlUsingIEW
+208 stub -noname SearchForElementInHead
+209 stub -noname JITCoCreateInstance
+210 stub -noname UrlHitsNetW
+211 stub -noname ClearAutoSuggestForForms
+212 stub -noname GetLinkInfo
+213 stub -noname UseCustomInternetSearch
+214 stub -noname GetSearchAssistantUrlW
+215 stub -noname GetSearchAssistantUrlA
+216 stub -noname GetDefaultInternetSearchUrlW
+217 stub -noname GetDefaultInternetSearchUrlA
+218 stub -noname IEParseDisplayNameWithBCW
+219 stub -noname IEILIsEqual
+220 stub @
+221 stub -noname IECreateFromPathCPWithBCA
+222 stub -noname IECreateFromPathCPWithBCW
+223 stub -noname ResetWebSettings
+224 stub -noname IsResetWebSettingsRequired
+225 stub -noname PrepareURLForDisplayUTF8W
+226 stub -noname IEIsLinkSafe
+227 stub -noname SHUseClassicToolbarGlyphs
+228 stub -noname SafeOpenPromptForShellExec
+229 stub -noname SafeOpenPromptForPackager
+
+@ stdcall -private DllCanUnloadNow() SHDOCVW_DllCanUnloadNow
+@ stdcall -private DllGetClassObject(long long ptr) SHDOCVW_DllGetClassObject
+@ stdcall DllGetVersion(ptr) SHDOCVW_DllGetVersion
+@ stdcall DllInstall(long wstr) SHDOCVW_DllInstall
+@ stdcall -private DllRegisterServer() SHDOCVW_DllRegisterServer
+@ stdcall -private DllUnregisterServer() SHDOCVW_DllUnregisterServer
+@ stub DllRegisterWindowClasses
+@ stub DoAddToFavDlg
+@ stub DoAddToFavDlgW
+@ stub DoFileDownload
+@ stub DoFileDownloadEx
+@ stub DoOrganizeFavDlg
+@ stub DoOrganizeFavDlgW
+@ stub DoPrivacyDlg
+@ stub HlinkFrameNavigate
+@ stub HlinkFrameNavigateNHL
+@ stub ImportPrivacySettings
+@ stub InstallReg_RunDLL
+@ stub IEWriteErrorLog
+@ stub OpenURL
+@ stub SHGetIDispatchForFolder
+@ stdcall SetQueryNetSessionCount(long)
+@ stub SoftwareUpdateMessageBox
+@ stub URLQualifyA
+@ stub URLQualifyW

reactos/lib/shdocvw
shdocvw_main.c added at 1.1
diff -N shdocvw_main.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ shdocvw_main.c	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,553 @@
+/*
+ * SHDOCVW - Internet Explorer Web Control
+ *
+ * Copyright 2001 John R. Sheets (for CodeWeavers)
+ * Copyright 2004 Mike McCormack (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 "config.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+#define COBJMACROS
+#define COM_NO_WINDOWS_H
+
+#include "windef.h"
+#include "winbase.h"
+#include "winreg.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "ole2.h"
+#include "shlwapi.h"
+
+#include "shdocvw.h"
+#include "uuids.h"
+#include "urlmon.h"
+
+#include "wine/unicode.h"
+#include "wine/debug.h"
+
+#include "initguid.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
+
+static const WCHAR szMozDlPath[] = {
+    'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\',
+    's','h','d','o','c','v','w',0
+};
+
+DEFINE_GUID( CLSID_MozillaBrowser, 0x1339B54C,0x3453,0x11D2,0x93,0xB9,0x00,0x00,0x00,0x00,0x00,0x00);
+
+typedef HRESULT (WINAPI *fnGetClassObject)(REFCLSID rclsid, REFIID iid, LPVOID *ppv);
+
+HINSTANCE shdocvw_hinstance = 0;
+static HMODULE SHDOCVW_hshell32 = 0;
+static HMODULE hMozCtl = (HMODULE)~0UL;
+
+
+/* convert a guid to a wide character string */
+static void SHDOCVW_guid2wstr( const GUID *guid, LPWSTR wstr )
+{
+    char str[40];
+
+    sprintf(str, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+           guid->Data1, guid->Data2, guid->Data3,
+           guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
+           guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
+    MultiByteToWideChar( CP_ACP, 0, str, -1, wstr, 40 );
+}
+
+static BOOL SHDOCVW_GetMozctlPath( LPWSTR szPath, DWORD sz )
+{
+    DWORD r, type;
+    BOOL ret = FALSE;
+    HKEY hkey;
+    static const WCHAR szPre[] = {
+        'S','o','f','t','w','a','r','e','\\',
+        'C','l','a','s','s','e','s','\\',
+        'C','L','S','I','D','\\',0 };
+    static const WCHAR szPost[] = {
+        '\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2',0 };
+    WCHAR szRegPath[(sizeof(szPre)+sizeof(szPost))/sizeof(WCHAR)+40];
+
+    strcpyW( szRegPath, szPre );
+    SHDOCVW_guid2wstr( &CLSID_MozillaBrowser, &szRegPath[strlenW(szRegPath)] );
+    strcatW( szRegPath, szPost );
+
+    TRACE("key = %s\n", debugstr_w( szRegPath ) );
+
+    r = RegOpenKeyW( HKEY_LOCAL_MACHINE, szRegPath, &hkey );
+    if( r != ERROR_SUCCESS )
+        return FALSE;
+
+    r = RegQueryValueExW( hkey, NULL, NULL, &type, (LPBYTE)szPath, &sz );
+    ret = ( r == ERROR_SUCCESS ) && ( type == REG_SZ );
+    RegCloseKey( hkey );
+
+    return ret;
+}
+
+/*************************************************************************
+ * SHDOCVW DllMain
+ */
+BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
+{
+	TRACE("%p 0x%lx %p\n", hinst, fdwReason, fImpLoad);
+	switch (fdwReason)
+	{
+	  case DLL_PROCESS_ATTACH:
+	    shdocvw_hinstance = hinst;
+	    break;
+	  case DLL_PROCESS_DETACH:
+	    if (SHDOCVW_hshell32) FreeLibrary(SHDOCVW_hshell32);
+	    if (hMozCtl && hMozCtl != (HMODULE)~0UL) FreeLibrary(hMozCtl);
+	    break;
+	}
+	return TRUE;
+}
+
+/*************************************************************************
+ *              DllCanUnloadNow (SHDOCVW.@)
+ */
+HRESULT WINAPI SHDOCVW_DllCanUnloadNow(void)
+{
+    FIXME("(void): stub\n");
+
+    return S_FALSE;
+}
+
+/*************************************************************************
+ *              SHDOCVW_TryDownloadMozillaControl
+ */
+typedef struct _IBindStatusCallbackImpl {
+    IBindStatusCallbackVtbl *vtbl;
+    DWORD ref;
+    HWND hDialog;
+    BOOL *pbCancelled;
+} IBindStatusCallbackImpl;
+
+static HRESULT WINAPI
+dlQueryInterface( IBindStatusCallback* This, REFIID riid, void** ppvObject )
+{
+    if( IsEqualIID(riid, &IID_IUnknown) ||
+        IsEqualIID(riid, &IID_IBindStatusCallback))
+    {
+        IBindStatusCallback_AddRef( This );
+        *ppvObject = This;
+        return S_OK;
+    }
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI dlAddRef( IBindStatusCallback* iface )
+{
+    IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
+    return InterlockedIncrement( &This->ref );
+}
+
+static ULONG WINAPI dlRelease( IBindStatusCallback* iface )
+{
+    IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
+    DWORD ref = InterlockedDecrement( &This->ref );
+    if( !ref )
+    {
+        DestroyWindow( This->hDialog );
+        HeapFree( GetProcessHeap(), 0, This );
+    }
+    return ref;
+}
+
+static HRESULT WINAPI
+dlOnStartBinding( IBindStatusCallback* iface, DWORD dwReserved, IBinding* pib)
+{
+    ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlGetPriority( IBindStatusCallback* iface, LONG* pnPriority)
+{
+    ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnLowResource( IBindStatusCallback* iface, DWORD reserved)
+{
+    ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnProgress( IBindStatusCallback* iface, ULONG ulProgress,
+              ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
+{
+    IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
+    HWND hItem;
+    LONG r;
+
+    hItem = GetDlgItem( This->hDialog, 1000 );
+    if( hItem && ulProgressMax )
+        SendMessageW(hItem,PBM_SETPOS,(ulProgress*100)/ulProgressMax,0);
+
+    hItem = GetDlgItem(This->hDialog, 104);
+    if( hItem )
+        SendMessageW(hItem,WM_SETTEXT, 0, (LPARAM) szStatusText);
+
+    SetLastError(0);
+    r = GetWindowLongPtrW( This->hDialog, GWLP_USERDATA );
+    if( r || GetLastError() )
+    {
+        *This->pbCancelled = TRUE;
+        ERR("Cancelled\n");
+        return E_ABORT;
+    }
+
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnStopBinding( IBindStatusCallback* iface, HRESULT hresult, LPCWSTR szError)
+{
+    ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlGetBindInfo( IBindStatusCallback* iface, DWORD* grfBINDF, BINDINFO* pbindinfo)
+{
+    ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnDataAvailable( IBindStatusCallback* iface, DWORD grfBSCF,
+                   DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed)
+{
+    ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnObjectAvailable( IBindStatusCallback* iface, REFIID riid, IUnknown* punk)
+{
+    ERR("\n");
+    return S_OK;
+}
+
+struct IBindStatusCallbackVtbl dlVtbl =
+{
+    dlQueryInterface,
+    dlAddRef,
+    dlRelease,
+    dlOnStartBinding,
+    dlGetPriority,
+    dlOnLowResource,
+    dlOnProgress,
+    dlOnStopBinding,
+    dlGetBindInfo,
+    dlOnDataAvailable,
+    dlOnObjectAvailable
+};
+
+static IBindStatusCallback* create_dl(HWND dlg, BOOL *pbCancelled)
+{
+    IBindStatusCallbackImpl *This;
+
+    This = HeapAlloc( GetProcessHeap(), 0, sizeof *This );
+    This->vtbl = &dlVtbl;
+    This->ref = 1;
+    This->hDialog = dlg;
+    This->pbCancelled = pbCancelled;
+
+    return (IBindStatusCallback*) This;
+}
+
+static DWORD WINAPI ThreadFunc( LPVOID info )
+{
+    IBindStatusCallback *dl;
+    static const WCHAR szUrlVal[] = {'M','o','z','i','l','l','a','U','r','l',0};
+    WCHAR path[MAX_PATH], szUrl[MAX_PATH];
+    LPWSTR p;
+    STARTUPINFOW si;
+    PROCESS_INFORMATION pi;
+    HWND hDlg = info;
+    DWORD r, sz, type;
+    HKEY hkey;
+    BOOL bCancelled = FALSE;
+
+    /* find the name of the thing to download */
+    szUrl[0] = 0;
+    r = RegOpenKeyW( HKEY_LOCAL_MACHINE, szMozDlPath, &hkey );
+    if( r == ERROR_SUCCESS )
+    {
+        sz = MAX_PATH;
+        r = RegQueryValueExW( hkey, szUrlVal, NULL, &type, (LPBYTE)szUrl, &sz );
+        RegCloseKey( hkey );
+    }
+    if( r != ERROR_SUCCESS )
+        goto end;
+
+    /* built the path for the download */
+    p = strrchrW( szUrl, '/' );
+    if (!p)
+        goto end;
+    if (!GetTempPathW( MAX_PATH, path ))
+        goto end;
+    strcatW( path, p+1 );
+
+    /* download it */
+    dl = create_dl(info, &bCancelled);
+    r = URLDownloadToFileW( NULL, szUrl, path, 0, dl );
+    if( dl )
+        IBindStatusCallback_Release( dl );
+    if( (r != S_OK) || bCancelled )
+        goto end;
+
+    /* run it */
+    memset( &si, 0, sizeof si );
+    si.cb = sizeof si;
+    r = CreateProcessW( path, NULL, NULL, NULL, 0, 0, NULL, NULL, &si, &pi );
+    if( !r )
+        goto end;
+    WaitForSingleObject( pi.hProcess, INFINITE );
+
+end:
+    EndDialog( hDlg, 0 );
+    return 0;
+}
+
+static INT_PTR CALLBACK
+dlProc ( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+    HANDLE hThread;
+    DWORD ThreadId;
+    HWND hItem;
+
+    switch (uMsg)
+    {
+    case WM_INITDIALOG:
+        SetWindowLongPtrW( hwndDlg, GWLP_USERDATA, 0 );
+        hItem = GetDlgItem(hwndDlg, 1000);
+        if( hItem )
+        {
+            SendMessageW(hItem,PBM_SETRANGE,0,MAKELPARAM(0,100));
+            SendMessageW(hItem,PBM_SETPOS,0,0);
+        }
+        hThread = CreateThread(NULL,0,ThreadFunc,hwndDlg,0,&ThreadId);
+        if (!hThread)
+            return FALSE;
+        return TRUE;
+    case WM_COMMAND:
+        if( wParam == IDCANCEL )
+            SetWindowLongPtrW( hwndDlg, GWLP_USERDATA, 1 );
+        return FALSE;
+    default:
+        return FALSE;
+    }
+}
+
+static BOOL SHDOCVW_TryDownloadMozillaControl()
+{
+    DWORD r;
+    WCHAR buf[0x100];
+    static const WCHAR szWine[] = { 'W','i','n','e',0 };
+    HANDLE hsem;
+
+    SetLastError( ERROR_SUCCESS );
+    hsem = CreateSemaphoreA( NULL, 0, 1, "mozctl_install_semaphore");
+    if( GetLastError() != ERROR_ALREADY_EXISTS )
+    {
+        LoadStringW( shdocvw_hinstance, 1001, buf, sizeof buf/sizeof(WCHAR) );
+        r = MessageBoxW(NULL, buf, szWine, MB_YESNO | MB_ICONQUESTION);
+        if( r != IDYES )
+            return FALSE;
+
+        DialogBoxW(shdocvw_hinstance, MAKEINTRESOURCEW(100), 0, dlProc);
+    }
+    else
+        WaitForSingleObject( hsem, INFINITE );
+    ReleaseSemaphore( hsem, 1, NULL );
+    CloseHandle( hsem );
+    
+    return TRUE;
+}
+ 
+static BOOL SHDOCVW_TryLoadMozillaControl()
+{
+    WCHAR szPath[MAX_PATH];
+    BOOL bTried = FALSE;
+
+    if( hMozCtl != (HMODULE)~0UL )
+        return hMozCtl ? TRUE : FALSE;
+
+    while( 1 )
+    {
+        if( SHDOCVW_GetMozctlPath( szPath, sizeof szPath ) )
+        {
+            hMozCtl = LoadLibraryExW(szPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
+            if( hMozCtl )
+                return TRUE;
+        }
+        if( bTried )
+        {
+            MESSAGE("You need to install the Mozilla ActiveX control to\n");
+            MESSAGE("use Wine's builtin CLSID_WebBrowser from SHDOCVW.DLL\n");
+            return FALSE;
+        }
+        SHDOCVW_TryDownloadMozillaControl();
+        bTried = TRUE;
+    }
+    return TRUE;
+}
+
+/*************************************************************************
+ *              DllGetClassObject (SHDOCVW.@)
+ */
+HRESULT WINAPI SHDOCVW_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
+{
+    TRACE("\n");
+
+    if( IsEqualGUID( &CLSID_WebBrowser, rclsid ) &&
+        SHDOCVW_TryLoadMozillaControl() )
+    {
+        HRESULT r;
+        fnGetClassObject pGetClassObject;
+
+        TRACE("WebBrowser class %s\n", debugstr_guid(rclsid) );
+
+        pGetClassObject = (fnGetClassObject)
+            GetProcAddress( hMozCtl, "DllGetClassObject" );
+
+        if( !pGetClassObject )
+            return CLASS_E_CLASSNOTAVAILABLE;
+        r = pGetClassObject( &CLSID_MozillaBrowser, riid, ppv );
+
+        TRACE("r = %08lx  *ppv = %p\n", r, *ppv );
+
+        return r;
+    }
+
+    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.@)
+ */
+HRESULT WINAPI SHDOCVW_DllGetVersion(DLLVERSIONINFO *info)
+{
+    if (info->cbSize != sizeof(DLLVERSIONINFO)) FIXME("support DLLVERSIONINFO2\n");
+
+    /* this is what IE6 on Windows 98 reports */
+    info->dwMajorVersion = 6;
+    info->dwMinorVersion = 0;
+    info->dwBuildNumber = 2600;
+    info->dwPlatformID = DLLVER_PLATFORM_WINDOWS;
+
+    return NOERROR;
+}
+
+/*************************************************************************
+ *              DllInstall (SHDOCVW.@)
+ */
+HRESULT WINAPI SHDOCVW_DllInstall(BOOL bInstall, LPCWSTR cmdline)
+{
+   FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline));
+
+   return S_OK;
+}
+
+/*************************************************************************
+ * SHDOCVW_LoadShell32
+ *
+ * makes sure the handle to shell32 is valid
+ */
+ BOOL SHDOCVW_LoadShell32(void)
+{
+     if (SHDOCVW_hshell32)
+       return TRUE;
+     return ((SHDOCVW_hshell32 = LoadLibraryA("shell32.dll")) != NULL);
+}
+
+/***********************************************************************
+ *		@ (SHDOCVW.110)
+ *
+ * Called by Win98 explorer.exe main binary, definitely has 0
+ * parameters.
+ */
+DWORD WINAPI WinList_Init(void)
+{
+    FIXME("(), stub!\n");
+    return 0x0deadfeed;
+}
+
+/***********************************************************************
+ *		@ (SHDOCVW.118)
+ *
+ * Called by Win98 explorer.exe main binary, definitely has only one
+ * parameter.
+ */
+static BOOL (WINAPI *pShellDDEInit)(BOOL start) = NULL;
+
+BOOL WINAPI ShellDDEInit(BOOL start)
+{
+    TRACE("(%d)\n", start);
+
+    if (!pShellDDEInit)
+    {
+      if (!SHDOCVW_LoadShell32())
+        return FALSE;
+      pShellDDEInit = GetProcAddress(SHDOCVW_hshell32, (LPCSTR)188);
+    }
+
+    if (pShellDDEInit)
+      return pShellDDEInit(start);
+    else
+      return FALSE;
+}
+
+/***********************************************************************
+ *		@ (SHDOCVW.125)
+ *
+ * Called by Win98 explorer.exe main binary, definitely has 0
+ * parameters.
+ */
+DWORD WINAPI RunInstallUninstallStubs(void)
+{
+    FIXME("(), stub!\n");
+    return 0x0deadbee;
+}
+
+/***********************************************************************
+ *              SetQueryNetSessionCount (SHDOCVW.@)
+ */
+DWORD WINAPI SetQueryNetSessionCount(DWORD arg)
+{
+    FIXME("(%lu), stub!\n", arg);
+    return 0;
+}

reactos/lib/shdocvw
version.rc added at 1.1
diff -N version.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ version.rc	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2003 Francois Gouget (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
+ */
+
+#define WINE_OLESELFREGISTER
+#define WINE_FILEDESCRIPTION_STR "Wine core dll"
+#define WINE_FILENAME_STR "shdocvw.dll"
+#define WINE_FILEVERSION 5,50,0,0
+#define WINE_FILEVERSION_STR "5.50.0.0"
+#define WINE_PRODUCTVERSION 5,50,0,0
+#define WINE_PRODUCTVERSION_STR "5.50"
+
+#include "wine/wine_common_ver.rc"

reactos/lib/shdocvw
webbrowser.c added at 1.1
diff -N webbrowser.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ webbrowser.c	23 Dec 2004 08:55:00 -0000	1.1
@@ -0,0 +1,280 @@
+/*
+ * 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(IWebBrowser *iface, REFIID riid, LPVOID *ppobj)
+{
+    IWebBrowserImpl *This = (IWebBrowserImpl *)iface;
+
+    FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI WB_AddRef(IWebBrowser *iface)
+{
+    IWebBrowserImpl *This = (IWebBrowserImpl *)iface;
+
+    TRACE("\n");
+    return ++(This->ref);
+}
+
+static ULONG WINAPI WB_Release(IWebBrowser *iface)
+{
+    IWebBrowserImpl *This = (IWebBrowserImpl *)iface;
+
+    /* static class, won't be freed */
+    TRACE("\n");
+    return --(This->ref);
+}
+
+/* IDispatch methods */
+static HRESULT WINAPI WB_GetTypeInfoCount(IWebBrowser *iface, UINT *pctinfo)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_GetTypeInfo(IWebBrowser *iface, UINT iTInfo, LCID lcid,
+                                     LPTYPEINFO *ppTInfo)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_GetIDsOfNames(IWebBrowser *iface, REFIID riid,
+                                       LPOLESTR *rgszNames, UINT cNames,
+                                       LCID lcid, DISPID *rgDispId)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_Invoke(IWebBrowser *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(IWebBrowser *iface)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_GoForward(IWebBrowser *iface)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_GoHome(IWebBrowser *iface)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_GoSearch(IWebBrowser *iface)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_Navigate(IWebBrowser *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(IWebBrowser *iface)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_Refresh2(IWebBrowser *iface, VARIANT *Level)
+{
+    FIXME("stub: %p\n", Level);
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_Stop(IWebBrowser *iface)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Application(IWebBrowser *iface, IDispatch **ppDisp)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Parent(IWebBrowser *iface, IDispatch **ppDisp)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Container(IWebBrowser *iface, IDispatch **ppDisp)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Document(IWebBrowser *iface, IDispatch **ppDisp)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_TopLevelContainer(IWebBrowser *iface, VARIANT_BOOL *pBool)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Type(IWebBrowser *iface, BSTR *Type)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Left(IWebBrowser *iface, long *pl)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_put_Left(IWebBrowser *iface, long Left)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Top(IWebBrowser *iface, long *pl)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_put_Top(IWebBrowser *iface, long Top)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Width(IWebBrowser *iface, long *pl)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_put_Width(IWebBrowser *iface, long Width)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Height(IWebBrowser *iface, long *pl)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_put_Height(IWebBrowser *iface, long Height)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_LocationName(IWebBrowser *iface, BSTR *LocationName)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_LocationURL(IWebBrowser *iface, BSTR *LocationURL)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+static HRESULT WINAPI WB_get_Busy(IWebBrowser *iface, VARIANT_BOOL *pBool)
+{
+    FIXME("stub \n");
+    return S_OK;
+}
+
+/**********************************************************************
+ * IWebBrowser virtual function table for IE Web Browser component
+ */
+
+static IWebBrowserVtbl WB_Vtbl =
+{
+    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 };
CVSspam 0.2.8