Visual Assert – The Unit Testing Add-In for Visual C++
cfix – C/C++ Unit Testing for Win32 and NT
 
 

WIN_TRACE

WIN_TRACE

Synopsis

WIN_TRACE allows arbitrary messages to be printed. The macro allows printf-style formatting and variable argument lists. Consult the documentation for printf for a list of format specifiers.

Declaration
void WIN_TRACE( 
	__in PCSTR Format, 
	...
	);

void WIN_TRACE( 
	__in PCWSTR Format, 
	...
	);
		

WIN_TRACE is overloaded to support both ANSI and UNICODE strings.

Parameters

[in] Format: Format string. Consult the documentation for printf for a list of format specifiers.

[in] ...: Arguments. Note that if you use the %s specifier in the format string, be sure that the wideness (i.e. ANSI vs. Unicode) of argument strings matches the wideness of the format string itself.

Usage example
WIN_TRACE( "Some message" );
WIN_TRACE( L"Foo=%s, Bar=%d", L"test", Bar );
			
Requirements

Table 7.41. 

 User ModeKernel Mode
Available since1.3N/A
HeaderDeclared in winunit.hN/A
LibraryLink to cfix.libN/A
DLLcfix.dllN/A
IRQLN/AN/A

Requires cl version 14.00 (VisualStudio 2005) or better.