DebugOutput

3.1

  void FAR _cdecl DebugOutput(flags, lpszFmt, . . . )    
  UINT flags; /* type of message, */  
  LPCSTR lpszFmt; /* address of formatting string */

The DebugOutput function sends a message to the debugging terminal. Applications can apply the formatting codes to the message string and use filters and options to control the message category.

Parameters

flags

Specifies the type of message to be sent to the debugging terminal. This parameter can be one of the following values:

Value Meaning

DBF_TRACE The message reports that no error has occurred and supplies information that may be useful during debugging. Example: “t Kernel: LoadResource(14AE of GDI)”
DBF_WARNING The message reports a situation that may or may not be an error, depending on the circumstances. Example: “wn Kernel: GlobalWire(17BE of GDI) (try GlobalLock)”
DBF_ERROR The message reports an error resulting from a failed call to a Windows function. The application continues to run. Example: “err Kernel: LocalShrink(15EA of GDI) (invalid local heap)”
DBF_FATAL The message reports an error that will terminate the application. Example: “fatl User: SetDeskWallpaper(16CA of USER)”

lpszFmt

Points to a formatting string identical to the formatting strings used by the Windows function wsprintf. This string must be less than 160 characters long. Any additional formatting can be done by supplying additional parameters following lpszFmt.

. . .

Specifies zero or more optional arguments. The number and type of arguments depends on the corresponding format-control character sequences specified in the lpszFmt parameter.

Return Value

This function does not return a value.

Comments

The messages sent by the DebugOutput function are affected by the system
debugging options and trace-filter flags that are set and retrieved by using the
GetWinDebugInfo
and SetWinDebugInfo functions. These options and flags are stored in a WINDEBUGINFO structure.

Unlike most other Windows functions, DebugOutput uses the C calling convention (_cdecl), rather than the Pascal calling convention. As a result, the caller must pop arguments off the stack. Also, arguments must be pushed on the stack from right to left. In C-language modules, the C compiler performs this task.

See Also

GetWinDebugInfo, OutputDebugString, SetWinDebugInfo, wsprintf