Commit 506f77f5 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent 8cb3ede4
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment