TracePrintfEx

[This is preliminary documentation and subject to change.]

The TracePrintfEx function outputs tracing information. TracePrintfEx differentiates itself from TracePrintf by offering extended options (Ex) implemented through non-zero dwFlags values. Output generated by TracePrintfEx includes up to the following: calling service or application's name, the current time, and tracing information in the format specified by the optional included in lpszFormat.

If dwFlags is zero, TracePrintfEx behaves exactly as TracePrintf.

DWORD TracePrintfEx(
  IN DWORD dwTraceID,
  IN DWORD dwFlags OPTIONAL,
  IN LPCTSTR lpszFormat,
  IN ... OPTIONAL
);
 

Parameters

dwTraceID
The handle returned by the calling service or application's initial TraceRegister call.
dwFlags
Flags that control appearance of TracePrintfEx output. Ensure dwFlags is one or more of the following:
TRACE_NO_STDINFO
Suppresses output of the standard information associated with dwTraceID.
TRACE_USE_MASK
Determines whether file and/or console output will be generated by comparing the high-order word of dwFlags against registry values FileTracingMask and ConsoleTracingMask.
lpszFormat
Pointer to a null-terminated string containing printf-style format control information.
...
One or more optional arguments, depending on the format control specified in lpszFormat.

Return Values

Successful execution of TracePrintfEx returns the number of characters output, excluding the terminating null-character.

Failure returns a zero. The error code can be retrieved by calling GetLastError.

QuickInfo

  Windows NT: Use version 5.0 and later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in rtutils.h.
  Import Library: Link with rtutils.lib.

See Also

TracePrintf, TraceRegisterEx, TraceDeregisterEx, TraceVprintfEx, TracePutsEx, TraceDumpEx, GetLastError