Mike McCormack : hlink: Use ShellExecute to start the link if we can'
t get a IHlinkTarget.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Aug 1 12:44:28 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 9198d016f2a44fd7bfdd1b9ef7375cd4990d021c
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=9198d016f2a44fd7bfdd1b9ef7375cd4990d021c
Author: Mike McCormack <mike at codeweavers.com>
Date: Wed Aug 2 03:25:36 2006 +0900
hlink: Use ShellExecute to start the link if we can't get a IHlinkTarget.
---
dlls/hlink/Makefile.in | 2 +-
dlls/hlink/link.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/dlls/hlink/Makefile.in b/dlls/hlink/Makefile.in
index 11423b0..b6cbb78 100644
--- a/dlls/hlink/Makefile.in
+++ b/dlls/hlink/Makefile.in
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = hlink.dll
-IMPORTS = ole32 advapi32 kernel32
+IMPORTS = shell32 ole32 advapi32 kernel32
IMPORTLIB = libhlink.$(IMPLIBEXT)
DELAYIMPORTS = urlmon
EXTRALIBS = -luuid
diff --git a/dlls/hlink/link.c b/dlls/hlink/link.c
index 814785a..cce6955 100644
--- a/dlls/hlink/link.c
+++ b/dlls/hlink/link.c
@@ -29,6 +29,7 @@ #include "winuser.h"
#include "ole2.h"
#include "unknwn.h"
#include "objidl.h"
+#include "shellapi.h"
#include "wine/debug.h"
#include "hlink.h"
@@ -428,6 +429,18 @@ static HRESULT WINAPI IHlink_fnNavigate(
IHlinkTarget_Navigate(target, grfHLNF, This->Location);
IHlinkTarget_Release(target);
}
+ else
+ {
+ static const WCHAR szOpen[] = {'o','p','e','n',0};
+ LPWSTR target = NULL;
+
+ r = IHlink_GetStringReference(iface, HLINKGETREF_DEFAULT, &target, NULL);
+ if (SUCCEEDED(r) && target)
+ {
+ ShellExecuteW(NULL, szOpen, target, NULL, NULL, SW_SHOW);
+ CoTaskMemFree(target);
+ }
+ }
RevokeBindStatusCallback(bcxt, pbsc);
More information about the wine-cvs
mailing list