hlink: Use ShellExecute to start the link if we can't get a IHlinkTarget.

This commit is contained in:
Mike McCormack 2006-08-02 03:25:36 +09:00 committed by Alexandre Julliard
parent 0e5f29ba92
commit 9198d016f2
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -29,6 +29,7 @@
#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(IHlink* iface, DWORD grfHLNF, LPBC pbc,
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);