mirror of
https://github.com/reactos/reactos.git
synced 2025-04-24 23:50:24 +00:00
[SHELL32] Add extra information when encountering an unexpected pidl
In addition, make pdump slightly less unusable
This commit is contained in:
parent
6a68717c58
commit
6304059721
4 changed files with 21 additions and 4 deletions
|
@ -245,11 +245,10 @@ void _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void pdump (LPCITEMIDLIST pidl)
|
static void pdump_impl (LPCITEMIDLIST pidl)
|
||||||
{
|
{
|
||||||
LPCITEMIDLIST pidltemp = pidl;
|
LPCITEMIDLIST pidltemp = pidl;
|
||||||
|
|
||||||
if (!TRACE_ON(pidl)) return;
|
|
||||||
|
|
||||||
if (! pidltemp)
|
if (! pidltemp)
|
||||||
{
|
{
|
||||||
|
@ -309,6 +308,20 @@ void pdump (LPCITEMIDLIST pidl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pdump(LPCITEMIDLIST pidl)
|
||||||
|
{
|
||||||
|
if (!TRACE_ON(pidl)) return;
|
||||||
|
|
||||||
|
return pdump_impl(pidl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void pdump_always(LPCITEMIDLIST pidl)
|
||||||
|
{
|
||||||
|
pdump_impl(pidl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void dump_pidl_hex( LPCITEMIDLIST pidl )
|
static void dump_pidl_hex( LPCITEMIDLIST pidl )
|
||||||
{
|
{
|
||||||
const unsigned char *p = (const unsigned char *)pidl;
|
const unsigned char *p = (const unsigned char *)pidl;
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#define __WINE_SHELL32_DEBUGHLP_H
|
#define __WINE_SHELL32_DEBUGHLP_H
|
||||||
|
|
||||||
extern void pdump (LPCITEMIDLIST pidl);
|
extern void pdump (LPCITEMIDLIST pidl);
|
||||||
|
extern void pdump_always (LPCITEMIDLIST pidl);
|
||||||
extern BOOL pcheck (LPCITEMIDLIST pidl);
|
extern BOOL pcheck (LPCITEMIDLIST pidl);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
|
|
|
@ -40,7 +40,8 @@ static WCHAR* BuildPathsList(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls
|
||||||
FileStructW* pDataW = _ILGetFileStructW(pidls[i]);
|
FileStructW* pDataW = _ILGetFileStructW(pidls[i]);
|
||||||
if (!pDataW)
|
if (!pDataW)
|
||||||
{
|
{
|
||||||
ERR("Got garbage pidl\n");
|
ERR("Mistreating a pidl:\n");
|
||||||
|
pdump_always(pidls[i]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1410,7 +1410,8 @@ HRESULT WINAPI CFSFolder::SetNameOf(
|
||||||
FileStructW* pDataW = _ILGetFileStructW(pidl);
|
FileStructW* pDataW = _ILGetFileStructW(pidl);
|
||||||
if (!pDataW)
|
if (!pDataW)
|
||||||
{
|
{
|
||||||
ERR("Got garbage pidl\n");
|
ERR("Got garbage pidl:\n");
|
||||||
|
pdump_always(pidl);
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1778,6 +1779,7 @@ HRESULT CFSFolder::_CreateShellExtInstance(const CLSID *pclsid, LPCITEMIDLIST pi
|
||||||
if (!pDataW)
|
if (!pDataW)
|
||||||
{
|
{
|
||||||
ERR("Got garbage pidl\n");
|
ERR("Got garbage pidl\n");
|
||||||
|
pdump_always(pidl);
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue