TracePutsEx

[This Tracing API is available for use in the operating systems listed in the Requirements section. It may be altered or unavailable in subsequent versions. Instead use the Event Tracing API.]

The TracePutsEx function is an efficient way to retrieve information associated with a registered service or application's identifier (dwTraceID). TracePutsEx differs from TracePuts in its extended (Ex) flexibility with regard to output, achieved through the use of non-zero flags implemented with dwFlags. TracePutsEx also outputs the string literal passed as the function's second argument.

DWORD TracePutsEx(
  DWORD dwTraceID,
  DWORD dwFlags,
  LPCTSTR lpszString
);

Parameters

  • dwTraceID
    [in] Handle returned by the calling service or application's initial TraceRegister call.

  • dwFlags
    [in] Specifies the flags that control appearance of TracePutsEx 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 is generated by comparing the high-order word of dwFlags against registry values \FileTracingMask and \ConsoleTracingMask.
  • lpszString
    [in] Specifies the string to be output.

Return Value

If the function is successful, TracePuts returns the number of characters output, excluding the terminating null-character.

If the function fails, the return value is zero. This may indicate that tracing is disabled in the registry. See Tracing Configuration for more information.

Requirements

Server Requires Windows Server 2003 or Windows 2000 Server.
Redistributable Requires RRAS download on Windows NT Server 4.0 SP3 and later.
Header

Declared in Rtutils.h.

Library

Use Rtutils.lib.

DLL Requires Rtutils.dll.
Unicode

Implemented as TracePutsExW (Unicode) and TracePutsExA (ANSI).

See Also

About Tracing
Tracing Reference
TracePuts
TraceRegisterEx
TracePrintfEx
TraceVprintfEx
TraceDumpEx