Module: wine Branch: master Commit: bbaa72de5f6baf007106775ed23c390adda0dfd8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bbaa72de5f6baf007106775ed2...
Author: Vladimir Pankratov scriptkid@mail.ru Date: Fri Nov 28 14:44:42 2008 +0500
shdocvw: Implement go_home function.
---
dlls/shdocvw/navigate.c | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index b5299d5..27276b6 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -776,11 +776,27 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx,
HRESULT go_home(DocHost *This) { + HKEY hkey; + DWORD res, type, size; + WCHAR wszPageName[MAX_PATH]; static const WCHAR wszAboutBlank[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; + static const WCHAR wszStartPage[] = {'S','t','a','r','t',' ','P','a','g','e',0}; + static const WCHAR wszSubKey[] = {'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}; + + res = RegOpenKeyW(HKEY_CURRENT_USER, wszSubKey, &hkey); + if (res != ERROR_SUCCESS) + return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL); + + size = sizeof(wszPageName); + res = RegQueryValueExW(hkey, wszStartPage, NULL, &type, (LPBYTE)&wszPageName, &size); + RegCloseKey(hkey); + if (res != ERROR_SUCCESS || type != REG_SZ) + return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL);
- FIXME("stub\n"); - - return navigate_url(This, wszAboutBlank, NULL, NULL, NULL, NULL); + return navigate_url(This, wszPageName, NULL, NULL, NULL, NULL); }
#define HLINKFRAME_THIS(iface) DEFINE_THIS(WebBrowser, HlinkFrame, iface)