ReactOS 0.4.15-dev-7958-gcd0bb1a
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)   _ROS_FAILED_HELPER((hr), #hr, __FILE__, __LINE__)
 
#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

ULONG Win32DbgPrint (const char *filename, int line, const char *lpFormat,...)
 
HRESULT HResultFromWin32 (DWORD hr)
 
BOOL _ROS_FAILED_HELPER (HRESULT hr, const char *expr, const char *filename, int line)
 
static BOOL ILIsSingle (LPCITEMIDLIST pidl)
 
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)    _ROS_FAILED_HELPER((hr), #hr, __FILE__, __LINE__)

Definition at line 88 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 579 of file shellutils.h.

◆ S_EQUAL

#define S_EQUAL   S_OK

Definition at line 577 of file shellutils.h.

◆ S_GREATERTHAN

#define S_GREATERTHAN   S_FALSE

Definition at line 578 of file shellutils.h.

◆ S_LESSTHAN

#define S_LESSTHAN   0xffff

Definition at line 576 of file shellutils.h.

Function Documentation

◆ _ROS_FAILED_HELPER()

BOOL _ROS_FAILED_HELPER ( HRESULT  hr,
const char expr,
const char filename,
int  line 
)
inline

Definition at line 78 of file shellutils.h.

79{
80 if (FAILED(hr))
81 {
82 Win32DbgPrint(filename, line, "Unexpected failure (%s)=%08x.\n", expr, hr);
83 return TRUE;
84 }
85 return FALSE;
86}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define FAILED(hr)
Definition: intsafe.h:51
const char * filename
Definition: ioapi.h:137
ULONG Win32DbgPrint(const char *filename, int line, const char *lpFormat,...)
Definition: shellutils.h:27
HRESULT hr
Definition: shlfolder.c:183
Definition: query.h:87
Definition: parser.c:49

◆ HIDA_GetPIDLFolder()

static PCUIDLIST_ABSOLUTE HIDA_GetPIDLFolder ( CIDA const pida)
inlinestatic

◆ HIDA_GetPIDLItem()

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

Definition at line 591 of file shellutils.h.

592{
593 return (PCUIDLIST_RELATIVE)(((LPBYTE)pida) + (pida)->aoffset[i + 1]);
594}
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
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57

Referenced by _ShowPropertiesDialogThread(), DoGetFileTitle(), CCopyMoveToMenu::DoRealFileOp(), CFontExt::Drop(), CMyDocsDropHandler::Drop(), CDeskLinkDropHandler::Drop(), CCopyAsPathMenu::Drop(), FontFolderMenuCallback(), COpenWithMenu::Initialize(), SH_ShowPropertiesDialog(), SHGetAttributesFromDataObject(), and TestHIDA().

◆ HResultFromWin32()

HRESULT HResultFromWin32 ( DWORD  hr)
inline

Definition at line 70 of file shellutils.h.

71{
72 // HRESULT_FROM_WIN32 will evaluate its parameter twice, this function will not.
73 return HRESULT_FROM_WIN32(hr);
74}
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92

Referenced by OpenServiceHelper().

◆ ILIsSingle()

static BOOL ILIsSingle ( LPCITEMIDLIST  pidl)
inlinestatic

Definition at line 581 of file shellutils.h.

582{
583 return pidl == ILFindLastID(pidl);
584}
LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
Definition: pidl.c:198

Referenced by SHOpenFolderAndSelectItems().

◆ Win32DbgPrint()

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

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}
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define NULL
Definition: types.h:112
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define sprintf(buf, format,...)
Definition: sprintf.c:55
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
LPCWSTR lpFormat
Definition: trayclock.cpp:32

Referenced by _ROS_FAILED_HELPER().