![]() |
dbgPrintf in NT User-mode driverJan 29, 1997 This information is provided "as is", there is no support or guarantee! Subject: printf() in a User-mode driver |
|
| // // Add to your SOURCES file-
C_DEFINES=-DUNICODE
-DSTRICT // debug.h // #if DBG #define dbgPrintf( _x_ ) dbgPrintf _x_ #else #define dbgPrintf( _x_ ) #endif // debug.c // #if DBG void dbgPrintf( PCHAR szFormat, ... ) { char buf[128]; va_list va; va_start(va, szFormat); vsprintf(buf, szFormat, va); va_end(va); OutputDebugStringA(buf); // NOTE: we use the ASCII, not Unicode version. } #endif |