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 );
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.
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,
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.