shell32: Use a helper to trace the type of a STRRET.
This commit is contained in:
parent
8cb3ede419
commit
506f77f52d
|
@ -42,14 +42,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||||
|
|
||||||
/************************* STRRET functions ****************************/
|
/************************* 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)
|
BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
|
||||||
{
|
{
|
||||||
TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n",
|
TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", dest, len, src, debugstr_strret(src), pidl);
|
||||||
dest,len,src,
|
|
||||||
(src->uType == STRRET_WSTR) ? "STRRET_WSTR" :
|
|
||||||
(src->uType == STRRET_CSTR) ? "STRRET_CSTR" :
|
|
||||||
(src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???",
|
|
||||||
pidl);
|
|
||||||
|
|
||||||
if (!dest)
|
if (!dest)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -70,7 +80,7 @@ BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FIXME("unknown type!\n");
|
FIXME("unknown type %u!\n", src->uType);
|
||||||
if (len) *dest = '\0';
|
if (len) *dest = '\0';
|
||||||
return FALSE;
|
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)
|
BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
|
||||||
{
|
{
|
||||||
TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n",
|
TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", dest, len, src, debugstr_strret(src), pidl);
|
||||||
dest,len,src,
|
|
||||||
(src->uType == STRRET_WSTR) ? "STRRET_WSTR" :
|
|
||||||
(src->uType == STRRET_CSTR) ? "STRRET_CSTR" :
|
|
||||||
(src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???",
|
|
||||||
pidl);
|
|
||||||
|
|
||||||
if (!dest)
|
if (!dest)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -110,7 +115,7 @@ BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FIXME("unknown type!\n");
|
FIXME("unknown type %u!\n", src->uType);
|
||||||
if (len) *dest = '\0';
|
if (len) *dest = '\0';
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue