Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

WPP_INIT_TRACING for Kernel-Mode Drivers

The WPP_INIT_TRACING macro registers the provider GUID and initializes the structures that are needed for software tracing in a kernel-mode driver.


    VOID
  WPP_INIT_TRACING(
    IN PDRIVER_OBJECT  DriverObject,
    IN OPT PUNICODE_STRING  RegistryPath
    );


   

Parameters

DriverObject

A pointer to the driver object that represents the driver.

Note  Starting with Windows XP, this parameter is not used and can be set to NULL.

RegistryPath

A pointer to a Unicode string that specifies the path to the driver's registry key.

Note  This parameter is not used and can be set to NULL,

Headers

Defined in a source file's trace message header file. The WPP preprocessor generates the header file and saves in the same directory as the source file.

Comments

A kernel-mode driver must use WPP_INIT_TRACING to activate software tracing. After the driver has activated software tracing, a user can enable and control tracing by using Tracelog.

The driver should only make one call to activate software tracing. Before the driver unloads, it should call WPP_CLEANUP to do the following:

  • Unregister the provider that was registered by calling WPP_INIT_TRACING.

  • Deactivate the software tracing.

For an example of how to make a WPP_INIT_TRACING call in a driver, see TraceDrv, a sample driver that was designed for software tracing. The sample is available to download from Windows hardware development samples.

See also

WPP_CLEANUP

 

 

Send comments about this topic to Microsoft

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.