IShellLink and non-existant exe files
Aric Stewart
aric at codeweavers.com
Fri Aug 20 08:35:16 CDT 2004
It is possible under windows to create a .Lnk file to an exe file before
it exists. Office 2000 does this, Scientific Word does this as do other
apps as well.
So a quick fix so that in IPersistFile_Save if the exe file is not
found, trust the path we are given and allow creation of the link.
-------------- next part --------------
Index: dlls/shell32/shelllink.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shelllink.c,v
retrieving revision 1.70
diff -u -w -r1.70 shelllink.c
--- dlls/shell32/shelllink.c 12 Aug 2004 23:00:53 -0000 1.70
+++ dlls/shell32/shelllink.c 20 Aug 2004 13:27:38 -0000
@@ -683,9 +683,14 @@
/* if there's no PIDL, generate one */
if( ! This->pPidl )
{
+ /*
+ * windows can create lnk files to executables that do not exist yet
+ * so if the executable does not exist the just trust the path they
+ * gave us
+ */
if( !*exePath )
- return E_FAIL;
-
+ This->pPidl = ILCreateFromPathW(This->sPath);
+ else
This->pPidl = ILCreateFromPathW(exePath);
}
More information about the wine-patches
mailing list