4 * This file is part of the ReactOS PSDK package.
7 * Created by Magnus Olsen.
9 * THIS SOFTWARE IS NOT COPYRIGHTED
11 * This source code is offered for use in the public domain. You may
12 * use, modify or distribute it freely.
14 * This code is distributed in the hope that it will be useful but
15 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
16 * DISCLAIMED. This includes but is not limited to warranties of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 #if !defined(_KSDEBUG_)
28 #define QQUOTE(y) QUOTE(y)
29 #define REMIND(str) __FILE__ "(" QQUOTE(__LINE__) ") : " str
32 #if defined(__cplusplus)
38 #if defined(IRPMJFUNCDESC)
39 static const PCHAR IrpMjFuncDesc
[] = {
41 "IRP_MJ_CREATE_NAMED_PIPE",
45 "IRP_MJ_QUERY_INFORMATION",
46 "IRP_MJ_SET_INFORMATION",
49 "IRP_MJ_FLUSH_BUFFERS",
50 "IRP_MJ_QUERY_VOLUME_INFORMATION",
51 "IRP_MJ_SET_VOLUME_INFORMATION",
52 "IRP_MJ_DIRECTORY_CONTROL",
53 "IRP_MJ_FILE_SYSTEM_CONTROL",
54 "IRP_MJ_DEVICE_CONTROL",
55 "IRP_MJ_INTERNAL_DEVICE_CONTROL",
57 "IRP_MJ_LOCK_CONTROL",
59 "IRP_MJ_CREATE_MAILSLOT",
60 "IRP_MJ_QUERY_SECURITY",
61 "IRP_MJ_SET_SECURITY",
65 #endif /* defined(IRPMJFUNCDESC) */
71 #define DEBUGLVL_BLAB TRACE_LEVEL_VERBOSE
72 #define DEBUGLVL_VERBOSE TRACE_LEVEL_VERBOSE
73 #define DEBUGLVL_TERSE TRACE_LEVEL_INFORMATION
74 #define DEBUGLVL_ERROR TRACE_LEVEL_ERROR
76 #define DEBUGLVL_WARNING TRACE_LEVEL_WARNING
77 #define DEBUGLVL_INFO TRACE_LEVEL_INFORMATION
80 #if !defined( DEBUG_LEVEL )
81 #if defined( DEBUG_VARIABLE )
82 #if defined( KSDEBUG_INIT )
83 ULONG DEBUG_VARIABLE
= DEBUGLVL_TERSE
;
85 extern ULONG DEBUG_VARIABLE
;
88 #define DEBUG_VARIABLE DEBUGLVL_TERSE
91 #if defined( DEBUG_VARIABLE )
92 #if defined( KSDEBUG_INIT )
93 ULONG DEBUG_VARIABLE
= DEBUG_LEVEL
;
95 extern ULONG DEBUG_VARIABLE
;
98 #define DEBUG_VARIABLE DEBUG_LEVEL
102 #if (NTDDI_VERSION >= NTDDI_WINXP)
103 #define _DbgPrintFEx(component, lvl, strings) { \
104 if ((lvl) <= DEBUG_VARIABLE) { \
105 DbgPrintEx(component, lvl, STR_MODULENAME); \
106 DbgPrintEx(component, lvl, strings); \
107 DbgPrintEx(component, lvl, "\n"); \
108 if ((lvl) == DEBUGLVL_ERROR) { \
113 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
115 #define _DbgPrintF(lvl, strings) { \
116 if (((lvl)==DEBUG_VARIABLE) || (lvl < DEBUG_VARIABLE)) { \
117 DbgPrint(STR_MODULENAME); \
120 if ((lvl) == DEBUGLVL_ERROR) { \
128 #define _DbgPrintF(lvl, strings)
130 #if (NTDDI_VERSION >= NTDDI_WINXP)
131 #define _DbgPrintFEx(component, lvl, strings)
136 #endif /* defined(_NTDDK_) */
138 #if defined(__cplusplus)
142 #endif /* _KSDEBUG_ */