2 #if !defined(_KSDEBUG_)
7 #define QQUOTE(y) QUOTE(y)
8 #define REMIND(str) __FILE__ "(" QQUOTE(__LINE__) ") : " str
11 #if defined(__cplusplus)
16 #define DEBUGLVL_ERROR 0
17 #define DEBUGLVL_TERSE 1
18 #define DEBUGLVL_VERBOSE 2
19 #define DEBUGLVL_BLAB 3
25 #if defined(IRPMJFUNCDESC)
26 static const PCHAR IrpMjFuncDesc
[] =
29 "IRP_MJ_CREATE_NAMED_PIPE",
33 "IRP_MJ_QUERY_INFORMATION",
34 "IRP_MJ_SET_INFORMATION",
37 "IRP_MJ_FLUSH_BUFFERS",
38 "IRP_MJ_QUERY_VOLUME_INFORMATION",
39 "IRP_MJ_SET_VOLUME_INFORMATION",
40 "IRP_MJ_DIRECTORY_CONTROL",
41 "IRP_MJ_FILE_SYSTEM_CONTROL",
42 "IRP_MJ_DEVICE_CONTROL",
43 "IRP_MJ_INTERNAL_DEVICE_CONTROL",
45 "IRP_MJ_LOCK_CONTROL",
47 "IRP_MJ_CREATE_MAILSLOT",
48 "IRP_MJ_QUERY_SECURITY",
49 "IRP_MJ_SET_SECURITY",
57 #if !defined( DEBUG_LEVEL )
58 #if defined( DEBUG_VARIABLE )
59 #if defined( KSDEBUG_INIT )
60 ULONG DEBUG_VARIABLE
= DEBUGLVL_TERSE
;
62 extern ULONG DEBUG_VARIABLE
;
65 #define DEBUG_VARIABLE DEBUGLVL_TERSE
68 #if defined( DEBUG_VARIABLE )
69 #if defined( KSDEBUG_INIT )
70 ULONG DEBUG_VARIABLE
= DEBUG_LEVEL
;
72 extern ULONG DEBUG_VARIABLE
;
75 #define DEBUG_VARIABLE DEBUG_LEVEL
79 #define _DbgPrintFEx(component, lvl, strings) \
81 if ((lvl) <= DEBUG_VARIABLE)\
83 DbgPrintEx(component, lvl, STR_MODULENAME);\
84 DbgPrintEx(component, lvl, strings);\
85 DbgPrintEx(component, lvl, "\n");\
86 if ((lvl) == DEBUGLVL_ERROR)\
93 #define _DbgPrintF(lvl, strings)\
95 if (((lvl)==DEBUG_VARIABLE) || (lvl < DEBUG_VARIABLE))\
97 DbgPrint(STR_MODULENAME);\
100 if ((lvl) == DEBUGLVL_ERROR)\
107 #define _DbgPrintF(lvl, strings)
108 #define _DbgPrintFEx(component, lvl, strings)
113 #if defined(__cplusplus)