ReactOS  0.4.14-dev-554-g2f8d847
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,...)
 

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

◆ 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  ULONG uRet;
34 
35  fname = strrchr(filename, '\\');
36  if (fname == NULL)
37  {
38  fname = strrchr(filename, '/');
39  if (fname != NULL)
40  fname++;
41  }
42  else
43  fname++;
44 
45  if (fname == NULL)
46  fname = filename;
47 
48  szMsgStart = szMsg + sprintf(szMsg, "%s:%d: ", fname, line);
49 
50  va_start(vl, lpFormat);
51  uRet = (ULONG) vsprintf(szMsgStart, lpFormat, vl);
52  va_end(vl);
53 
54  OutputDebugStringA(szMsg);
55 
56  return uRet;
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
unsigned int ULONG
Definition: retypes.h:1
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18