WPP and Global Logger Session

Hello,
I would like to log to the global logger session, but I don’t know how to do that. I have a NDIS IM driver and I need to log something during DriverEntry.

I have done all these things (at WinXP platform):

  • inserted “#define WPP_GLOBALLOGGER” between WPP_CONTROL_GUIDS and include statement for the trace message header file (.tmh)
  • configured Global Logger with using: “tracelog -start GlobalLogger -kd”
  • inserted my GUID under WMI\GlobalLogger subkey, i.e.
    HKLM\System\CurrentControlSet\Control\WMI\GlobalLogger\05781AD1-C542-439b-A79E-65918C6949D4
    added two REG_DWORD 0xffffffff values: “Filters” and “Level”
  • Updated “sources”: RUN_WPP= $(SOURCES) -km -func:DoTraceLevelMessage(LEVEL,FLAGS,MSG,…) -scan:…\wmiTrace.h
  • Restart the system

In DriverEntry I call:
WPP_INIT_TRACING( pDriverObject, RegistryPath )
DoTraceLevelMessage(…),
but the message isn’t written into global “trace.log” file. If I schedule a thread from DriverEntry which logs a msg every one second, first logged message in “trace.log” is after 10 seconds (checked with “traceview” utility). It means, log is working, but my ControlGUID may not be associated with GlobalLogger (?).

Has anybody got it working?

thanks,
Petr Kurtin

Di you set the Flags ?

You need to have an entry in the registry for Flags, not Filters.

http://msdn2.microsoft.com/en-us/library/ms797174.aspx

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Petr Kurtin
Sent: Monday, May 28, 2007 12:57 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WPP and Global Logger Session

Hello,

I would like to log to the global logger session, but I don’t know how
to do that. I have a NDIS IM driver and I need to log something during
DriverEntry.

I have done all these things (at WinXP platform):

  • inserted “#define WPP_GLOBALLOGGER” between WPP_CONTROL_GUIDS and
    include statement for the trace message header file (.tmh)

  • configured Global Logger with using: “tracelog -start GlobalLogger
    -kd”

  • inserted my GUID under WMI\GlobalLogger subkey, i.e.

HKLM\System\CurrentControlSet\Control\WMI\GlobalLogger\05781AD1-C542-439
b-A79E-65918C6949D4

added two REG_DWORD 0xffffffff values: “Filters” and
“Level”

  • Updated “sources”: RUN_WPP= $(SOURCES) -km
    -func:DoTraceLevelMessage(LEVEL,FLAGS,MSG,…) -scan:…\wmiTrace.h

  • Restart the system

In DriverEntry I call:

WPP_INIT_TRACING( pDriverObject, RegistryPath )

DoTraceLevelMessage(…),

but the message isn’t written into global “trace.log” file. If I
schedule a thread from DriverEntry which logs a msg every one second,
first logged message in “trace.log” is after 10 seconds (checked with
“traceview” utility). It means, log is working, but my ControlGUID may
not be associated with GlobalLogger (?).

Has anybody got it working?

thanks,

Petr Kurtin


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer