ReactOS  0.4.15-dev-1029-g3f30b1e
shellutils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DbgPrint(fmt, ...)   Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
 
#define IID_PPV_ARG(Itype, ppType)   IID_##Itype, (void**)(ppType)
 
#define IID_NULL_PPV_ARG(Itype, ppType)   IID_##Itype, NULL, (void**)(ppType)
 
#define FAILED_UNEXPECTEDLY(hr)   (FAILED(hr) && (Win32DbgPrint(__FILE__, __LINE__, "Unexpected failure %08x.\n", hr), TRUE))
 
#define S_LESSTHAN   0xffff
 
#define S_EQUAL   S_OK
 
#define S_GREATERTHAN   S_FALSE
 
#define MAKE_COMPARE_HRESULT(x)   ((x)>0 ? S_GREATERTHAN : ((x)<0 ? S_LESSTHAN : S_EQUAL))
 

Functions

static ULONG Win32DbgPrint (const char *filename, int line, const char *lpFormat,...)
 
static PCUIDLIST_ABSOLUTE HIDA_GetPIDLFolder (CIDA const *pida)
 
static PCUIDLIST_RELATIVE HIDA_GetPIDLItem (CIDA const *pida, SIZE_T i)
 

Macro Definition Documentation

◆ DbgPrint

#define DbgPrint (   fmt,
  ... 
)    Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__)

Definition at line 59 of file shellutils.h.

◆ FAILED_UNEXPECTEDLY

#define FAILED_UNEXPECTEDLY (   hr)    (FAILED(hr) && (Win32DbgPrint(__FILE__, __LINE__, "Unexpected failure %08x.\n", hr), TRUE))

Definition at line 71 of file shellutils.h.

◆ IID_NULL_PPV_ARG

#define IID_NULL_PPV_ARG (   Itype,
  ppType 
)    IID_##Itype, NULL, (void**)(ppType)

Definition at line 67 of file shellutils.h.

◆ IID_PPV_ARG

#define IID_PPV_ARG (   Itype,
  ppType 
)    IID_##Itype, (void**)(ppType)

Definition at line 66 of file shellutils.h.

◆ MAKE_COMPARE_HRESULT

#define MAKE_COMPARE_HRESULT (   x)    ((x)>0 ? S_GREATERTHAN : ((x)<0 ? S_LESSTHAN : S_EQUAL))

Definition at line 535 of file shellutils.h.

◆ S_EQUAL

#define S_EQUAL   S_OK

Definition at line 533 of file shellutils.h.

◆ S_GREATERTHAN

#define S_GREATERTHAN   S_FALSE

Definition at line 534 of file shellutils.h.

◆ S_LESSTHAN

#define S_LESSTHAN   0xffff

Definition at line 532 of file shellutils.h.

Function Documentation

◆ HIDA_GetPIDLFolder()

static PCUIDLIST_ABSOLUTE HIDA_GetPIDLFolder ( CIDA const pida)
inlinestatic

Definition at line 538 of file shellutils.h.

539 {
540  return (PCUIDLIST_ABSOLUTE)(((LPBYTE)pida) + (pida)->aoffset[0]);
541 }
unsigned char * LPBYTE
Definition: typedefs.h:53
const ITEMIDLIST_ABSOLUTE UNALIGNED * PCUIDLIST_ABSOLUTE
Definition: shtypes.idl:63

Referenced by CCopyToMenu::DoGetFileTitle(), CMoveToMenu::DoGetFileTitle(), CCopyToMenu::DoRealCopy(), CMoveToMenu::DoRealMove(), CMyDocsDropHandler::Drop(), CFontExt::Drop(), and TestHIDA().

◆ HIDA_GetPIDLItem()

static PCUIDLIST_RELATIVE HIDA_GetPIDLItem ( CIDA const pida,
SIZE_T  i 
)
inlinestatic

Definition at line 543 of file shellutils.h.

544 {
545  return (PCUIDLIST_RELATIVE)(((LPBYTE)pida) + (pida)->aoffset[i + 1]);
546 }
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
unsigned char * LPBYTE
Definition: typedefs.h:53
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57

Referenced by CCopyToMenu::DoGetFileTitle(), CMoveToMenu::DoGetFileTitle(), CCopyToMenu::DoRealCopy(), CMoveToMenu::DoRealMove(), CMyDocsDropHandler::Drop(), CFontExt::Drop(), FontFolderMenuCallback(), and TestHIDA().

◆ Win32DbgPrint()

static ULONG Win32DbgPrint ( const char filename,
int  line,
const char lpFormat,
  ... 
)
inlinestatic

Definition at line 27 of file shellutils.h.

28 {
29  char szMsg[512];
30  char *szMsgStart;
31  const char *fname;
32  va_list vl;
33 
34  fname = strrchr(filename, '\\');
35  if (fname == NULL)
36  {
37  fname = strrchr(filename, '/');
38  if (fname != NULL)
39  fname++;
40  }
41  else
42  fname++;
43 
44  if (fname == NULL)
45  fname = filename;
46 
47  szMsgStart = szMsg + sprintf(szMsg, "%s:%d: ", fname, line);
48 
49  va_start(vl, lpFormat);
50  vsprintf(szMsgStart, lpFormat, vl);
51  va_end(vl);
52 
53  OutputDebugStringA(szMsg);
54 
55  /* Return STATUS_SUCCESS, since we are supposed to mimic DbgPrint */
56  return 0;
57 }
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
const char * filename
Definition: ioapi.h:135
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define va_end(ap)
Definition: acmsvcex.h:90
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:48
char * va_list
Definition: acmsvcex.h:78
LPCWSTR lpFormat
Definition: trayclock.cpp:32
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18