>Per other posts in this group, I looked at O/S specific
tracing in WINDDK\3790\src\general\toaster\func\featured2,
and noticed under Win2k, toaster invokes WPP_INIT_TRACING in
StartDevice. Is this necessary to get tracing to work under
Win2k? Is tracing broken under Win2k if a driver calls
IoCreateDevice in DriverEntry followed by the WPP_INIT_TRACING macro?
You can do it either way. I do it both ways. My DriverEntry code
creates a separate DO used only for tracing. I then initialize WPP, also in
DriverEntry. I stop WPP and delete the tracing DO in my RemoveDevice
handler if my count of “regular” devices hits zero. I have duplicated the
DriverEntry code to create the tracing DO and start WPP in my AddDevice
handler if a device is subsequently added before the driver is unloaded.
The easiest way to do it is probably the simpler Start/Remove logic
in the toaster example. I wanted the most coverage possible, so I start WPP
as soon as I can (DriverEntry) by using the separate DO. I played with the
placement of the other startup code in AddDevice and StartDevice. I put it
in AddDevice to have better coverage of the StartDevice handler. I found
that there is some latency following the WPP_INIT_TRACING call before
messages will be picked up. I was missing messages of interest in my
StartDevice function, so getting WPP going in AddDevice was the better
answer for me.
Chris Myers
It is dangerous to leave the tracing code enabled in a Win2k
production driver? I am ready to conditionalize it all for
W2k3, especially if tracing doesn’t work under Win2k.Thank you,
David Schwartz
Marathon Technologies Corporation
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256You are currently
subscribed to ntdev as: xxxxx@quatech.com To unsubscribe
send a blank email to xxxxx@lists.osr.com