Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The following table summarizes the debugging macros.
You can use these macros to call the debugging functions RegisterDbgZones, NKDbgPrintfW, DebugBreak, and WriteDebugLEDconditionally based on whether you want these calls to appear in Debug, Retail, and Ship builds.
Macro | Description |
---|---|
DEBUGREGISTER (hMod) |
Calls RegisterDbgZonesto register zones for the current module (a DLL or process). This macro only registers zones on Debug builds; it does nothing on Retail and ship builds. This macro assumes that a global variable dpCurSettingshas already been defined, where dpCurSettingsmust be a DBGPARAMstructure. |
RETAILREGISTERZONES (hMod) |
Calls RegisterDbgZonesto register zones for the current module (a DLL or process). This macro only registers zones on Debug and Retail builds; it does nothing on Ship builds. This macro assumes that a global variable dpCurSettingshas already been defined, where dpCurSettingsmust be a DBGPARAMstructure. |
DEBUGZONE (n) |
Associates a mask bit with a zone. |
DEBUGMSG (cond, printf_exp) |
Conditionally outputs a formatted debugging message to NKDbgPrintfW. This macro is only present in Debug builds; it does nothing on Retail and ship builds. |
RETAILMSG (cond,printf_exp) |
Conditionally outputs a formatted debugging message to NKDbgPrintfW. This macro is only present in Debug and Retail builds; it does nothing on ship builds. |
ERRORMSG (cond,printf_exp) |
Conditionally outputs a formatted error message to NKDbgPrintfW, adding the file name and line number where the error occurred. This macro is only present in Debug and Retail builds; it does nothing on ship builds. |
DEBUGCHK (exp) |
Asserts an expression and produces a DebugBreakif the expression is FALSE. This assertion is only present in Debug builds; it does nothing on Retail and Ship builds. This macro assumes that a global variable dpCurSettingshas already been defined, where dpCurSettingsmust be a DBGPARAMstructure. |
ASSERT (exp) |
Asserts an expression and produces a DebugBreakif the expression is FALSE. This assertion does not assume dpCurSettings is present. The assertion is only present in Debug builds; it does nothing on Retail and Ship builds. |
ASSERTMSG (msg, cond) |
Asserts an expression, and if the expression is FALSE, produces an error message to NKDbgPrintfWand a DebugBreak. This macro is only present in Debug builds; it does nothing on Retail and Ship builds. |
DEBUGLED (cond, parms) |
Conditionally outputs a pattern to WriteDebugLED. This macro is only present in Debug builds; it does nothing on Retail and Ship builds. |
RETAILLED (cond, parms) |
Conditionally outputs a pattern to WriteDebugLED. This macro is only present in Debug and Retail builds; it does nothing on Ship builds. |