## Printer Device Driver

[prev][next][parent][TOC]

### DBPRINTF (()) and DBPRINTIF (())

DBPRINTF uses the printf functionally of ANSI C to write messages to the kernel debugger screen. DBPRINTF is a macro; but because it can have a variable number of parameters, it must have an extra set of parentheses.

The following is the structure of DBPRINTF:

    DBPRINTF(                // Outputs a text string to debug terminal (like C printf command)

       PSZ pszFormatString,  // String with same format options as printf command

       (...) );              // Parameter list of values to be placed in format string

The following is the structure of DBPRINTIF:

    DBPRINTIF(                // A conditional DBPRINTF command

       BOOL bDoit,            // Outputs format string if this parameter evaluates to TRUE

       PSZ pszFormatString,   // String with same format options as printf command

       (...) );               // Parameter list of values to be placed in format string

ASSERTT, ASSERTF, DBPRINTF, and DBPRINTIF Notes:

ASSERTT and ASSERTF as well as DBPRINTF and DBPRINTIF are macros. They are built for the debug-level build and disappear for the retail-level build.

These macros rely on the PMDD device driver to be activated. To activate the PMDD device driver, add a /Cx parameter to the following statement ( where x is the COM port number):

    DEVICE=C:\OS2\PMDD.SYS /Cx