Eliyas
Sun Sep 11 21:57:24 CDT 2005
Event tracing on Windows 2000 is not as straight forward as it's on XP and
later OSes. If you go thru the toaster/feature2 function driver, you will
reallize that you have to jump thru few hoops to get the tracing. To list
few: you have to use a device object to init tracing as opposed to
DriverObject; initialization has to happen in the context of start device as
opposed to DriverEntry; have to handle WMI irps to enable/disable tracing
events. Now doing all this in a NDIS miniport driver is not easy, especially
handling WMI irps unless you override the dispatch routines set by NDIS -
not a good thing to do.
I tried out tracing in one of my NDIS miniport drivers and got it to work on
XP. The steps to implement tracing in a NDIS miniport driver is no different
from a WDM driver when it comes to XP and later OSes.
> I call WPP_SYSCONTROL first in driver entry then WPP_INIT_TRACE in my
> initialize function. I use the PDEVICE_OBJECT returned from
> NdisMRegisterDevice function.
>
I don't have access to DDK now but I think WPP_SYSCONTROL sets it own
routine for handling sys-control irps. Now after calling this macro, if you
call NDIS to register your miniport, it's going to override what ever is set
in the DriverObject's dispatch handler with it's own handler. May be that
the tracing is not working in your case.
--
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/default.mspx
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx