shell32: Use a helper to trace the type of a STRRET.

This commit is contained in:
Michael Stefaniuc 2012-09-12 12:21:41 +02:00 committed by Alexandre Julliard
parent 8cb3ede419
commit 506f77f52d
1 changed files with 19 additions and 14 deletions

View File

@ -42,14 +42,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
/************************* STRRET functions ****************************/
static const char *debugstr_strret(STRRET *s)
{
switch (s->uType)
{
case STRRET_WSTR:
return "STRRET_WSTR";
case STRRET_CSTR:
return "STRRET_CSTR";
case STRRET_OFFSET:
return "STRRET_OFFSET";
default:
return "STRRET_???";
}
}
BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
{
TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n",
dest,len,src,
(src->uType == STRRET_WSTR) ? "STRRET_WSTR" :
(src->uType == STRRET_CSTR) ? "STRRET_CSTR" :
(src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???",
pidl);
TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", dest, len, src, debugstr_strret(src), pidl);
if (!dest)
return FALSE;
@ -70,7 +80,7 @@ BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
break;
default:
FIXME("unknown type!\n");
FIXME("unknown type %u!\n", src->uType);
if (len) *dest = '\0';
return FALSE;
}
@ -82,12 +92,7 @@ BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
{
TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n",
dest,len,src,
(src->uType == STRRET_WSTR) ? "STRRET_WSTR" :
(src->uType == STRRET_CSTR) ? "STRRET_CSTR" :
(src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???",
pidl);
TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", dest, len, src, debugstr_strret(src), pidl);
if (!dest)
return FALSE;
@ -110,7 +115,7 @@ BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
break;
default:
FIXME("unknown type!\n");
FIXME("unknown type %u!\n", src->uType);
if (len) *dest = '\0';
return FALSE;
}