Author: cwittich
Date: Sun May 30 12:25:19 2010
New Revision: 47439
URL:
http://svn.reactos.org/svn/reactos?rev=47439&view=rev
Log:
[SHDOCVW]
sync to wine 1.2 RC2
Modified:
trunk/reactos/dll/win32/shdocvw/iexplore.c
trunk/reactos/dll/win32/shdocvw/intshcut.c
trunk/reactos/dll/win32/shdocvw/navigate.c
trunk/reactos/dll/win32/shdocvw/shdocvw.h
trunk/reactos/dll/win32/shdocvw/shdocvw.inf
trunk/reactos/dll/win32/shdocvw/shdocvw.spec
trunk/reactos/dll/win32/shdocvw/shdocvw_main.c
trunk/reactos/dll/win32/shdocvw/view.c
trunk/reactos/dll/win32/shdocvw/webbrowser.c
Modified: trunk/reactos/dll/win32/shdocvw/iexplore.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/iexplore…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/iexplore.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/iexplore.c [iso-8859-1] Sun May 30 12:25:19 2010
@@ -36,6 +36,8 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
+
+#define IDI_APPICON 101
static const WCHAR szIEWinFrame[] = {
'I','E','F','r','a','m','e',0 };
@@ -85,7 +87,7 @@
void register_iewindow_class(void)
{
- WNDCLASSW wc;
+ WNDCLASSEXW wc;
memset(&wc, 0, sizeof wc);
wc.style = 0;
@@ -93,13 +95,15 @@
wc.cbClsExtra = 0;
wc.cbWndExtra = sizeof(InternetExplorer*);
wc.hInstance = shdocvw_hinstance;
- wc.hIcon = 0;
- wc.hCursor = LoadCursorW(0, MAKEINTRESOURCEW(IDI_APPLICATION));
+ wc.hIcon = LoadIconW(GetModuleHandleW(0), MAKEINTRESOURCEW(IDI_APPICON));
+ wc.hIconSm = LoadImageW(GetModuleHandleW(0), MAKEINTRESOURCEW(IDI_APPICON),
IMAGE_ICON,
+ GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
LR_SHARED);
+ wc.hCursor = LoadCursorW(0, MAKEINTRESOURCEW(IDC_ARROW));
wc.hbrBackground = 0;
wc.lpszClassName = szIEWinFrame;
wc.lpszMenuName = NULL;
- RegisterClassW(&wc);
+ RegisterClassExW(&wc);
}
void unregister_iewindow_class(void)
Modified: trunk/reactos/dll/win32/shdocvw/intshcut.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/intshcut…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/intshcut.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/intshcut.c [iso-8859-1] Sun May 30 12:25:19 2010
@@ -74,6 +74,7 @@
PROCESS_INFORMATION pi;
BOOL ret;
WCHAR app[MAX_PATH];
+ void *redir;
GetSystemDirectoryW( app, MAX_PATH - sizeof(menubuilder)/sizeof(WCHAR) );
strcatW( app, menubuilder );
@@ -91,7 +92,9 @@
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
+ Wow64DisableWow64FsRedirection( &redir );
ret = CreateProcessW( app, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi
);
+ Wow64RevertWow64FsRedirection( redir );
heap_free( buffer );
Modified: trunk/reactos/dll/win32/shdocvw/navigate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/navigate…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/navigate.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/navigate.c [iso-8859-1] Sun May 30 12:25:19 2010
@@ -642,7 +642,7 @@
return free_doc_navigate_task(task, TRUE);
}
- if(task->post_data) {
+ if(post_data) {
task->post_data = SafeArrayCreateVector(VT_UI1, 0, post_data_size);
if(!task->post_data)
return free_doc_navigate_task(task, TRUE);
@@ -950,7 +950,132 @@
HlinkFrame_UpdateHlink
};
+#define TARGETFRAME2_THIS(iface) DEFINE_THIS(WebBrowser, ITargetFrame2, iface)
+
+static HRESULT WINAPI TargetFrame2_QueryInterface(ITargetFrame2 *iface, REFIID riid, void
**ppv)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ return IWebBrowser2_QueryInterface(WEBBROWSER2(This), riid, ppv);
+}
+
+static ULONG WINAPI TargetFrame2_AddRef(ITargetFrame2 *iface)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ return IWebBrowser2_AddRef(WEBBROWSER2(This));
+}
+
+static ULONG WINAPI TargetFrame2_Release(ITargetFrame2 *iface)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ return IWebBrowser2_Release(WEBBROWSER2(This));
+}
+
+static HRESULT WINAPI TargetFrame2_SetFrameName(ITargetFrame2 *iface, LPCWSTR
pszFrameName)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameName));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_GetFrameName(ITargetFrame2 *iface, LPWSTR
*ppszFrameName)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, ppszFrameName);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_GetParentFrame(ITargetFrame2 *iface, IUnknown
**ppunkParent)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, ppunkParent);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_SetFrameSrc(ITargetFrame2 *iface, LPCWSTR
pszFrameSrc)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pszFrameSrc));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_GetFrameSrc(ITargetFrame2 *iface, LPWSTR
*ppszFrameSrc)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_GetFramesContainer(ITargetFrame2 *iface, IOleContainer
**ppContainer)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, ppContainer);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_SetFrameOptions(ITargetFrame2 *iface, DWORD dwFlags)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%x)\n", This, dwFlags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_GetFrameOptions(ITargetFrame2 *iface, DWORD
*pdwFlags)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, pdwFlags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_SetFrameMargins(ITargetFrame2 *iface, DWORD dwWidth,
DWORD dwHeight)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%d %d)\n", This, dwWidth, dwHeight);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_GetFrameMargins(ITargetFrame2 *iface, DWORD *pdwWidth,
DWORD *pdwHeight)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pdwWidth, pdwHeight);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_FindFrame(ITargetFrame2 *iface, LPCWSTR pszTargetName,
DWORD dwFlags, IUnknown **ppunkTargetFrame)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(pszTargetName), dwFlags,
ppunkTargetFrame);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI TargetFrame2_GetTargetAlias(ITargetFrame2 *iface, LPCWSTR
pszTargetName, LPWSTR *ppszTargetAlias)
+{
+ WebBrowser *This = TARGETFRAME2_THIS(iface);
+ FIXME("(%p)->(%s %p)\n", This, debugstr_w(pszTargetName),
ppszTargetAlias);
+ return E_NOTIMPL;
+}
+
+#undef TARGETFRAME2_THIS
+
+static const ITargetFrame2Vtbl TargetFrame2Vtbl = {
+ TargetFrame2_QueryInterface,
+ TargetFrame2_AddRef,
+ TargetFrame2_Release,
+ TargetFrame2_SetFrameName,
+ TargetFrame2_GetFrameName,
+ TargetFrame2_GetParentFrame,
+ TargetFrame2_SetFrameSrc,
+ TargetFrame2_GetFrameSrc,
+ TargetFrame2_GetFramesContainer,
+ TargetFrame2_SetFrameOptions,
+ TargetFrame2_GetFrameOptions,
+ TargetFrame2_SetFrameMargins,
+ TargetFrame2_GetFrameMargins,
+ TargetFrame2_FindFrame,
+ TargetFrame2_GetTargetAlias
+};
+
void WebBrowser_HlinkFrame_Init(WebBrowser *This)
{
This->lpHlinkFrameVtbl = &HlinkFrameVtbl;
-}
+ This->lpITargetFrame2Vtbl = &TargetFrame2Vtbl;
+}
Modified: trunk/reactos/dll/win32/shdocvw/shdocvw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/shdocvw.…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/shdocvw.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/shdocvw.h [iso-8859-1] Sun May 30 12:25:19 2010
@@ -37,6 +37,7 @@
#include "exdisp.h"
#include "mshtmhst.h"
#include "hlink.h"
+#include "htiframe.h"
#include "wine/unicode.h"
@@ -126,7 +127,9 @@
const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl;
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
const IHlinkFrameVtbl *lpHlinkFrameVtbl;
+ const ITargetFrame2Vtbl *lpITargetFrame2Vtbl;
const IServiceProviderVtbl *lpServiceProviderVtbl;
+ const IDataObjectVtbl *lpDataObjectVtbl;
LONG ref;
@@ -184,6 +187,8 @@
#define ACTIVEOBJ(x) ((IOleInPlaceActiveObject*)
&(x)->lpOleInPlaceActiveObjectVtbl)
#define OLECMD(x) ((IOleCommandTarget*)
&(x)->lpOleCommandTargetVtbl)
#define HLINKFRAME(x) ((IHlinkFrame*) &(x)->lpHlinkFrameVtbl)
+#define DATAOBJECT(x) ((IDataObject*) &(x)->lpDataObjectVtbl)
+#define TARGETFRAME2(x) ((ITargetFrame2*)
&(x)->lpITargetFrame2Vtbl)
#define CLIENTSITE(x) ((IOleClientSite*)
&(x)->lpOleClientSiteVtbl)
#define INPLACESITE(x) ((IOleInPlaceSite*)
&(x)->lpOleInPlaceSiteVtbl)
@@ -198,6 +203,7 @@
void WebBrowser_OleObject_Init(WebBrowser*);
void WebBrowser_ViewObject_Init(WebBrowser*);
+void WebBrowser_DataObject_Init(WebBrowser*);
void WebBrowser_Persist_Init(WebBrowser*);
void WebBrowser_ClassInfo_Init(WebBrowser*);
void WebBrowser_HlinkFrame_Init(WebBrowser*);
Modified: trunk/reactos/dll/win32/shdocvw/shdocvw.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/shdocvw.…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/shdocvw.inf [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/shdocvw.inf [iso-8859-1] Sun May 30 12:25:19 2010
@@ -149,9 +149,9 @@
[IE.Reg]
-HKLM,"Software\Microsoft\Internet
Explorer","Build",,"62900.2180"
-HKLM,"Software\Microsoft\Internet Explorer","IVer",,"103"
-HKLM,"Software\Microsoft\Internet
Explorer","Version",,"6.0.2900.2180"
+HKLM,"Software\Microsoft\Internet
Explorer","Build",,"86001"
+HKLM,"Software\Microsoft\Internet
Explorer","Version",,"8.0.6001.18702"
+HKLM,"Software\Microsoft\Internet
Explorer","W2kVersion",,"8.0.6001.18702"
[Strings]
Modified: trunk/reactos/dll/win32/shdocvw/shdocvw.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/shdocvw.…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/shdocvw.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/shdocvw.spec [iso-8859-1] Sun May 30 12:25:19 2010
@@ -40,7 +40,7 @@
151 stdcall -noname URLSubRegQueryA(str str long ptr long long)
152 stub -noname CShellUIHelper_CreateInstance2
153 stub -noname IsURLChild
-158 stub -noname SHRestricted2A
+158 stdcall -noname SHRestricted2A(long str long)
159 stdcall -noname SHRestricted2W(long wstr long)
160 stub -noname SHIsRestricted2W
161 stub @ # CSearchAssistantOC::OnDraw
Modified: trunk/reactos/dll/win32/shdocvw/shdocvw_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/shdocvw_…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/shdocvw_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/shdocvw_main.c [iso-8859-1] Sun May 30 12:25:19 2010
@@ -440,3 +440,24 @@
FIXME("(%d %s %d) stub\n", res, debugstr_w(url), reserved);
return 0;
}
+
+/******************************************************************
+ * SHRestricted2A (SHDOCVW.158)
+ *
+ * See SHRestricted2W
+ */
+DWORD WINAPI SHRestricted2A(DWORD restriction, LPCSTR url, DWORD reserved)
+{
+ LPWSTR urlW = NULL;
+ DWORD res;
+
+ TRACE("(%d, %s, %d)\n", restriction, debugstr_a(url), reserved);
+ if (url) {
+ DWORD len = MultiByteToWideChar(CP_ACP, 0, url, -1, NULL, 0);
+ urlW = heap_alloc(len * sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, url, -1, urlW, len);
+ }
+ res = SHRestricted2W(restriction, urlW, reserved);
+ heap_free(urlW);
+ return res;
+}
Modified: trunk/reactos/dll/win32/shdocvw/view.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/view.c?r…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/view.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/view.c [iso-8859-1] Sun May 30 12:25:19 2010
@@ -1,5 +1,6 @@
/*
* Copyright 2005 Jacek Caban
+ * Copyright 2010 Ilya Shpigor
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,6 +22,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
+/**********************************************************************
+ * Implement the IViewObject interface
+ */
+
#define VIEWOBJ_THIS(iface) DEFINE_THIS(WebBrowser, ViewObject, iface)
static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void
**ppv)
@@ -122,3 +127,112 @@
{
This->lpViewObjectVtbl = &ViewObjectVtbl;
}
+
+/**********************************************************************
+ * Implement the IDataObject interface
+ */
+
+#define DATAOBJ_THIS(iface) DEFINE_THIS(WebBrowser, DataObject, iface)
+
+static HRESULT WINAPI DataObject_QueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID *
ppvObj)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ return IWebBrowser2_QueryInterface(WEBBROWSER(This), riid, ppvObj);
+}
+
+static ULONG WINAPI DataObject_AddRef(LPDATAOBJECT iface)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ return IWebBrowser2_AddRef(WEBBROWSER(This));
+}
+
+static ULONG WINAPI DataObject_Release(LPDATAOBJECT iface)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ return IWebBrowser2_Release(WEBBROWSER(This));
+}
+
+static HRESULT WINAPI DataObject_GetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn,
STGMEDIUM *pmedium)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DataObject_GetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc,
STGMEDIUM *pmedium)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DataObject_QueryGetData(LPDATAOBJECT iface, LPFORMATETC
pformatetc)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DataObject_GetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC
pformatectIn, LPFORMATETC pformatetcOut)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DataObject_SetData(LPDATAOBJECT iface, LPFORMATETC pformatetc,
STGMEDIUM *pmedium, BOOL fRelease)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DataObject_EnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection,
IEnumFORMATETC **ppenumFormatEtc)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DataObject_DAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD
advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DataObject_DUnadvise(LPDATAOBJECT iface, DWORD dwConnection)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DataObject_EnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA
**ppenumAdvise)
+{
+ WebBrowser *This = DATAOBJ_THIS(iface);
+ FIXME("(%p)->()\n", This);
+ return E_NOTIMPL;
+}
+
+static const IDataObjectVtbl DataObjectVtbl = {
+ DataObject_QueryInterface,
+ DataObject_AddRef,
+ DataObject_Release,
+ DataObject_GetData,
+ DataObject_GetDataHere,
+ DataObject_QueryGetData,
+ DataObject_GetCanonicalFormatEtc,
+ DataObject_SetData,
+ DataObject_EnumFormatEtc,
+ DataObject_DAdvise,
+ DataObject_DUnadvise,
+ DataObject_EnumDAdvise
+};
+
+#undef DATAOBJ_THIS
+
+void WebBrowser_DataObject_Init(WebBrowser *This)
+{
+ This->lpDataObjectVtbl = &DataObjectVtbl;
+}
Modified: trunk/reactos/dll/win32/shdocvw/webbrowser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/webbrows…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/webbrowser.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/webbrowser.c [iso-8859-1] Sun May 30 12:25:19 2010
@@ -102,9 +102,15 @@
}else if(IsEqualGUID(&IID_IHlinkFrame, riid)) {
TRACE("(%p)->(IID_IHlinkFrame %p)\n", This, ppv);
*ppv = HLINKFRAME(This);
+ }else if(IsEqualGUID(&IID_ITargetFrame2, riid)) {
+ TRACE("(%p)->(IID_ITargetFrame2 %p)\n", This, ppv);
+ *ppv = TARGETFRAME2(This);
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
*ppv = SERVPROV(This);
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
+ }else if(IsEqualGUID(&IID_IDataObject, riid)) {
+ *ppv = DATAOBJECT(This);
+ TRACE("(%p)->(IID_IDataObject %p)\n", This, ppv);
}else if(IsEqualGUID(&IID_IQuickActivate, riid)) {
TRACE("(%p)->(IID_IQuickActivate %p) returning NULL\n", This, ppv);
return E_NOINTERFACE;
@@ -1132,6 +1138,7 @@
WebBrowser_OleObject_Init(ret);
WebBrowser_ViewObject_Init(ret);
+ WebBrowser_DataObject_Init(ret);
WebBrowser_Persist_Init(ret);
WebBrowser_ClassInfo_Init(ret);
WebBrowser_HlinkFrame_Init(ret);