ScsiDebugPrint routine

The ScsiDebugPrint routine prints debug information with a level of verbosity based on global values set in the kernel debugger or set in the registry and initialized when the system boots.

Syntax


VOID ScsiDebugPrint(
   ULONG  DebugPrintLevel,
   PCCHAR DebugMessage
);

Parameters

DebugPrintLevel

Contains a value between 0 and 3 that specifies the amount of verbosity. A value of 3 signifies the highest level of verbosity. A value of 0 signifies the lowest level. ScsiDebugPrint will print the message pointed to by DebugMessage, together with other debugging information. For information about how the meaning of DebugPrintLevel has changed in Windows XP and later operating systems, see the remarks section.

DebugMessage

Pointer to the message to be printed.

Return value

None

Remarks

Prior to Windows XP, the ScsiDebugPrint routine compared the value passed to it in the DebugPrintLevel parameter with the value of the global variable ScsiDebug.and printed the DebugMessage string and diagnostic output whenever DebugPrintLevel was less than or equal to ScsiDebug. If DebugPrintLevel was greater than ScsiDebug.ScsiDebugPrint did not print anything.

In Windows XP and later operating systems, ScsiDebugPrint no longer compares DebugPrintLevel to ScsiDebug. Instead, ScsiDebugPrint simply calls the routine DbgPrintEx and passes it the DebugMessage pointer. Before ScsiDebugPrint calls DbgPrintEx it maps the value passed in DebugPrintLevel to a value used by DbgPrintEx as follows.

Value in DebugPrintLevelValue Passed to DbgPrintEx

0

DPFLTR_WARNING_LEVEL

1

DPFLTR_TRACE_LEVEL

2

DPFLTR_TRACE_LEVEL

3

DPFLTR_INFO_LEVEL

 

To view the message pointed to by DebugMessage from the kernel debugger, use the component filter mask Kd_ScsiMiniPort_Mask. For more information about debugging masks, see DbgPrintEx.

ScsiDebugPrint only functions in checked builds. ScsiDebugPrint compiles to nothing in free builds.

Requirements

Target platform

Header

Srb.h (include Miniport.h or Scsi.h)

Library

Scsiport.lib

See also

DbgPrintEx

 

 

Send comments about this topic to Microsoft

Show: