Share via


TRACE2

TRACE2(exp,param1,param2)

Parameters

exp

A format string as used in the run-time function printf.

param1

The name of the variable whose value should be dumped.

param2

The name of the variable whose value should be dumped.

Remarks

See TRACE0 for a description of the TRACE2 macro.

Example

// example for TRACE2
int i = 1;
char sz[] = "one";
TRACE2( "Integer = %d, String = %s\n", i, sz );
// Output: 'Integer = 1, String = one'

// another example for TRACE2
// Get major and minor version numbers of Windows
DWORD dwVersion = GetVersion();
DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));

TRACE2("This is Windows version %d.%2.2d.\n", dwWindowsMajorVersion, dwWindowsMinorVersion);