[PATCH v2] shell32: Implement FCIDM_SHVIEW_CREATELINK
Nikolay Sivov
bunglehead at gmail.com
Thu Jun 8 17:34:14 CDT 2017
On 05.06.2017 18:42, Aric Stewart wrote:
>
> v2: suggestions from Nikolay Sivov
>
> Presently the wine file explorer has a create shortcut entry that
> does nothing. This implements the FCIDM_SHVIEW_CREATELINK command.
>
> Signed-off-by: Aric Stewart <aric at codeweavers.com>
> ---
> dlls/shell32/shlview_cmenu.c | 49 ++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
>
I tested this a bit more, and it's more complicated than that:
- created file name format is "<target file name> - Shortcut.lnk", where
"Shortcut" is localized. If such file exists, it tries to create unique
name using extended format "<target file name> - Shortcut (%u).lnk",
where %u starts with 2;
- for special folders link is placed on the desktop;
- for fs folders without write access user is prompted with message box,
asking if shortcut file should be placed on the desktop or not.
I think we should address at least some of those, like generating unique
name. It's possible this needs extension for ISFHelper.
Regarding patch itself, there's still some room for improvement:
- QI check is not required, IPersistFile is always supported;
- still !SUCCEEDED();
- path concatenation should use some API imho;
- no allocation failure check;
- MAX_PATH assumptions.
More information about the wine-devel
mailing list