shdocvw.dll:Add implementation `go_home` function
Ivan Sinitsin
ivan at etersoft.ru
Wed Jul 9 07:39:51 CDT 2008
Add implementation of function `go_home` in navigate.c (shdocvw.dll). Now we
read URL of home page from Registry, but if we cann`t read value from the
registry, then load `About:blank` page.
Changelog:
This patch add implementation of function `go_home` (navigate.c shdocvw.dll).
--
Sinitsin Ivan
-------------- next part --------------
From a49a5e3c4026788c932cac79f907ac2bacb90b30 Mon Sep 17 00:00:00 2001
From: Sinitsin Ivan <ivan at etersoft.ru>
Date: Wed, 9 Jul 2008 16:35:57 +0400
Subject: [PATCH] shdocvw.dll:Add implementation of `go_home` function
---
dlls/shdocvw/navigate.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c
index 7ca0b0f..c442bb1 100644
--- a/dlls/shdocvw/navigate.c
+++ b/dlls/shdocvw/navigate.c
@@ -778,10 +778,28 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx,
HRESULT go_home(DocHost *This)
{
static const WCHAR wszAboutBlank[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
+ HKEY hKey;
+ static const WCHAR wszRegistryKey[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\','M','a','i','n',0};
+ static const WCHAR wszRegStartPage[] = {'S','t','a','r','t',' ','P','a','g','e',0};
+ DWORD type,size;
+ static WCHAR wszStartPage[2048];
+
+ /*we must read url of home page from registry*/
+ size = sizeof(wszStartPage);
+ RegOpenKeyExW(HKEY_CURRENT_USER, wszRegistryKey,
+ 0, KEY_QUERY_VALUE, &hKey );
+ if (RegQueryValueExW(hKey, wszRegStartPage, NULL, &type,
+ (LPVOID) &wszStartPage, &size) != ERROR_SUCCESS) {
+ TRACE("No home page. Start 'About:blank'\n");
+ RegCloseKey(hKey);
+ return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL);
+ }
+
+ RegCloseKey(hKey);
- FIXME("stub\n");
+ TRACE("Start (%s)\n",debugstr_w(wszStartPage));
- return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL);
+ return navigate_url(This, wszStartPage, NULL, NULL, NULL, NULL);
}
#define HLINKFRAME_THIS(iface) DEFINE_THIS(WebBrowser, HlinkFrame, iface)
--
1.5.4.5.GIT
More information about the wine-patches
mailing list