hlink: Use ShellExecute to start the link if we can't get a IHlinkTarget.
This commit is contained in:
parent
0e5f29ba92
commit
9198d016f2
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue