Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1011 B

  1. /*++
  2. Copyright(c) 1998,99 Microsoft Corporation
  3. Module Name:
  4. trace.c
  5. Abstract:
  6. Windows Load Balancing Service (WLBS)
  7. Driver - support for WMI event tracing
  8. History:
  9. 4/01/01 JosephJ Created
  10. --*/
  11. #define NLB_TRACING_ENABLED 1
  12. #include <ntddk.h>
  13. #include <wmistr.h>
  14. #include <wlbsparm.h>
  15. #include "trace.h"
  16. #include "trace.tmh"
  17. UINT Trace_Skip_Initialization = 0;
  18. PDRIVER_OBJECT Trace_Saved_Driver_Object = NULL;
  19. VOID
  20. Trace_Initialize(
  21. PVOID driver_obj,
  22. PVOID registry_path
  23. )
  24. {
  25. if (!Trace_Skip_Initialization)
  26. {
  27. PDRIVER_OBJECT DriverObject = (PDRIVER_OBJECT) driver_obj;
  28. PUNICODE_STRING RegistryPath = (PUNICODE_STRING) registry_path;
  29. Trace_Saved_Driver_Object = DriverObject;
  30. WPP_INIT_TRACING(DriverObject, RegistryPath);
  31. }
  32. }
  33. VOID
  34. Trace_Deinitialize(VOID)
  35. {
  36. if (Trace_Saved_Driver_Object != NULL)
  37. {
  38. WPP_CLEANUP(Trace_Saved_Driver_Object);
  39. }
  40. }