shell32: Unicode'ify ISFHelper interface
Vitaliy Margolen
wine-devel at kievinfo.com
Sat Mar 4 13:26:49 CST 2006
Saturday, March 4, 2006, 10:35:54 AM, Michael Jung wrote:
> ChangeLog:
> Unicode'ify shell32 internal ISFHelper interface and it's implementors.
> dlls/shell32/shellfolder.h | 4 ++-
> dlls/shell32/shfldr_fs.c | 55
> +++++++++++++++++++++--------------------- dlls/shell32/shfldr_unixfs.c |
> 32 ++++++++++++++----------
> dlls/shell32/shv_bg_cmenu.c | 6 ++---
> 4 files changed, 51 insertions(+), 46 deletions(-)
Few questions:
> - if (uLen < strlen (szNewFolder) + 4)
> + if (uLen < lstrlenW (wszNewFolder) + 4)
Probably should use sizeof(wszNewFolder)/sizeof(WCHAR) + 4. A bit awkward
but compiled into single number. And it looks like that's what you used
in shfldr_unixfs.c <g>.
> - _ILSimpleGetText (pidl, szText, MAX_PATH);
> - if (0 == strcasecmp (szText, lpName)) {
> - sprintf (lpName, "%s %d", szNewFolder, i++);
> + _ILSimpleGetTextW (pidl, wszText, MAX_PATH);
> + if (0 == lstrcmpiW (wszText, pwszName)) {
> + sprintfW (pwszName, wszFormat, wszNewFolder, i++);
To be safe probably should use snprintfW instead.
> + if (This->sPathTarget)
> + lstrcpyW(wszNewDir, This->sPathTarget);
Kind of the same thing.
Here
> +++ b/dlls/shell32/shfldr_fs.c
> + if (uLen < lstrlenW (wszNewFolder) + 4)
and here
> +++ b/dlls/shell32/shfldr_unixfs.c
> + if (uLen < sizeof(wszNewFolder)/sizeof(WCHAR)+3)
Why 4 in one place and 3 in the other?
Vitaliy Margolen
More information about the wine-devel
mailing list