ReactOS  0.4.13-dev-247-g0f29b3f
debughlp.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void pdump (LPCITEMIDLIST pidl)
 
BOOL pcheck (LPCITEMIDLIST pidl)
 
const charshdebugstr_guid (const struct _GUID *id)
 

Function Documentation

◆ pcheck()

BOOL pcheck ( LPCITEMIDLIST  pidl)

Definition at line 336 of file debughlp.cpp.

337 {
338  DWORD type;
339  LPCITEMIDLIST pidltemp = pidl;
340 
341  while( pidltemp && pidltemp->mkid.cb )
342  {
343  LPPIDLDATA pidlData = _dbg_ILGetDataPointer(pidltemp);
344 
345  if (pidlData)
346  {
347  type = pidlData->type;
348  switch( type )
349  {
350  case PT_CPLAPPLET:
351  case PT_GUID:
352  case PT_SHELLEXT:
353  case PT_DRIVE:
354  case PT_DRIVE1:
355  case PT_DRIVE2:
356  case PT_DRIVE3:
357  case PT_FOLDER:
358  case PT_VALUE:
359  case PT_VALUEW:
360  case PT_FOLDER1:
361  case PT_WORKGRP:
362  case PT_COMP:
363  case PT_NETPROVIDER:
364  case PT_NETWORK:
365  case PT_IESPECIAL1:
366  case PT_YAGUID:
367  case PT_IESPECIAL2:
368  case PT_SHARE:
369  break;
370  default:
371  ERR("unknown IDLIST %p [%p] size=%u type=%x\n",
372  pidl, pidltemp, pidltemp->mkid.cb,type );
373  dump_pidl_hex( pidltemp );
374  return FALSE;
375  }
376  pidltemp = _dbg_ILGetNext(pidltemp);
377  }
378  else
379  {
380  return FALSE;
381  }
382  }
383  return TRUE;
384 }
static LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:48
#define TRUE
Definition: types.h:120
#define PT_DRIVE3
Definition: pidl.h:90
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define PT_WORKGRP
Definition: pidl.h:98
#define PT_IESPECIAL2
Definition: pidl.h:104
#define PT_NETWORK
Definition: pidl.h:101
#define PT_DRIVE2
Definition: pidl.h:89
#define PT_DRIVE
Definition: pidl.h:88
#define PT_YAGUID
unsigned long DWORD
Definition: ntddk_ex.h:95
static LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:26
#define PT_FOLDER1
Definition: pidl.h:93
#define PT_IESPECIAL1
Definition: pidl.h:102
#define ERR(fmt,...)
Definition: debug.h:109
#define PT_COMP
Definition: pidl.h:99
#define PT_DRIVE1
Definition: pidl.h:92
#define PT_VALUE
Definition: pidl.h:95
#define PT_NETPROVIDER
Definition: pidl.h:100
#define PT_FOLDER
Definition: pidl.h:94
#define PT_SHARE
Definition: pidl.h:105
#define PT_CPLAPPLET
Definition: pidl.h:86
#define PT_GUID
#define PT_VALUEW
Definition: pidl.h:96
#define PT_SHELLEXT
static void dump_pidl_hex(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:312

◆ pdump()

void pdump ( LPCITEMIDLIST  pidl)

Definition at line 248 of file debughlp.cpp.

249 {
250  LPCITEMIDLIST pidltemp = pidl;
251 
252  if (!TRACE_ON(pidl)) return;
253 
254  if (! pidltemp)
255  {
256  MESSAGE ("-------- pidl=NULL (Desktop)\n");
257  }
258  else
259  {
260  MESSAGE ("-------- pidl=%p\n", pidl);
261  if (pidltemp->mkid.cb)
262  {
263  do
264  {
265  if (_ILIsUnicode(pidltemp))
266  {
267  DWORD dwAttrib = 0;
269  DWORD type = pData ? pData->type : 0;
270  LPWSTR szLongName = _dbg_ILGetTextPointerW(pidltemp);
271  LPWSTR szShortName = _dbg_ILGetSTextPointerW(pidltemp);
272  char szName[MAX_PATH];
273 
275  if ( pData && (PT_FOLDER == type || PT_VALUE == type) )
276  dwAttrib = pData->u.file.uFileAttribs;
277 
278  MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n",
279  pidltemp, pidltemp->mkid.cb, type, dwAttrib,
280  debugstr_a(szName), debugstr_w(szLongName), debugstr_w(szShortName));
281  }
282  else
283  {
284  DWORD dwAttrib = 0;
286  DWORD type = pData ? pData->type : 0;
287  LPSTR szLongName = _dbg_ILGetTextPointer(pidltemp);
288  LPSTR szShortName = _dbg_ILGetSTextPointer(pidltemp);
289  char szName[MAX_PATH];
290 
292  if ( pData && (PT_FOLDER == type || PT_VALUE == type) )
293  dwAttrib = pData->u.file.uFileAttribs;
294 
295  MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n",
296  pidltemp, pidltemp->mkid.cb, type, dwAttrib,
297  debugstr_a(szName), debugstr_a(szLongName), debugstr_a(szShortName));
298  }
299 
300  pidltemp = _dbg_ILGetNext(pidltemp);
301 
302  } while (pidltemp && pidltemp->mkid.cb);
303  }
304  else
305  {
306  MESSAGE ("empty pidl (Desktop)\n");
307  }
308  pcheck(pidl);
309  }
310 }
static LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:48
#define MESSAGE
Definition: options.h:86
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
char * LPSTR
Definition: xmlstorage.h:182
static LPWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:94
#define debugstr_w
Definition: kernel32.h:32
BOOL _ILIsUnicode(LPCITEMIDLIST pidl)
Definition: pidl.c:1868
static void _dbg_ILSimpleGetText(LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
Definition: debughlp.cpp:207
#define debugstr_a
Definition: kernel32.h:31
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
static LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:26
static LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:56
BOOL pcheck(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:336
static LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:139
#define PT_VALUE
Definition: pidl.h:95
static const WCHAR szName[]
Definition: msipriv.h:1194
static LPWSTR _dbg_ILGetSTextPointerW(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:161
#define PT_FOLDER
Definition: pidl.h:94
WCHAR * LPWSTR
Definition: xmlstorage.h:184
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define TRACE_ON(x)
Definition: compat.h:65

◆ shdebugstr_guid()

const char* shdebugstr_guid ( const struct _GUID id)

Definition at line 414 of file debughlp.cpp.

415 {
416  unsigned int i;
417  const char* name = NULL;
418  char clsidbuf[100];
419 
420  if (!id) return "(null)";
421 
422  for (i=0; i < sizeof(InterfaceDesc) / sizeof(InterfaceDesc[0]); i++) {
424  }
425  if (!name) {
426  if (HCR_GetClassNameA(*id, clsidbuf, 100))
427  name = clsidbuf;
428  }
429 
430  return wine_dbg_sprintf( "\n\t{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x} (%s)",
431  id->Data1, id->Data2, id->Data3,
432  id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3],
433  id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7], name ? name : "unknown" );
434 }
REFIID riid
Definition: precomp.h:44
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:271
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
static const struct @519 InterfaceDesc[]
BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len)
Definition: classes.c:423
Definition: name.c:36
GLenum GLuint id
Definition: glext.h:5579
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

Referenced by CShellItem::BindToHandler(), CDrivesFolder::BindToObject(), CFSFolder::BindToObject(), CNetFolder::BindToStorage(), CControlPanelFolder::BindToStorage(), CDrivesFolder::BindToStorage(), CPrinterFolder::BindToStorage(), CDesktopFolder::BindToStorage(), CFSFolder::BindToStorage(), IDefClFImpl::CreateInstance(), CNetFolder::CreateViewObject(), CDrivesFolder::CreateViewObject(), CPrinterFolder::CreateViewObject(), CControlPanelFolder::CreateViewObject(), CDesktopFolder::CreateViewObject(), CFSFolder::CreateViewObject(), DllGetClassObject(), CNetFolder::GetUIObjectOf(), CPrinterFolder::GetUIObjectOf(), CDrivesFolder::GetUIObjectOf(), CControlPanelFolder::GetUIObjectOf(), CDesktopFolder::GetUIObjectOf(), CFSFolder::GetUIObjectOf(), IDefClF_fnConstructor(), IDefClF_fnCreateInstance(), IDefClF_fnQueryInterface(), IDefClFImpl::Initialize(), SHCoCreateInstance(), and SHCreateDefClassObject().