Absolutely no sweat. As you correctly surmised, I was responding to the OP,
who was, it appears, erroneously thinking that the trace facility carries
more baggage than his roll-your-own approach. I hadn’t considered the
redistributable issue, but that appears to have been resolved, as well.
And yes, I figured you to have looked at those articles long and hard. 
Thanks for the hearty laugh, though. 
Phil
Philip D. Barila Windows DDK MVP
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
“Bill McKenzie” wrote in message
news:xxxxx@ntdev…
>
> Oops, sorry Phil, I thought you had posted a reply to me (my newreader put
> your post directly under mine). Didn’t mean to get attitude there.
>
> –
> Bill McKenzie
> Compuware Corporation
> Watch your IRPs/IRBs/URBs/SRBs/NDIS pkts with our free WDMSniffer tool:
> http://frontline.compuware.com/nashua/patches/utility.htm
>
>
> “Bill McKenzie” wrote in message
> news:xxxxx@ntdev…
> >
> > > Please look at WPP tracing again.
> > > Especially, look at the OSR articles:
> > > http://www.osronline.com/article.cfm?id=200
> > > http://www.osronline.com/article.cfm?id=213
> > >
> >
> > If you think you have read any documentation related to WPP tracing more
> > often, or more thoroughly than I have, think again.
> >
> > > That’s the point of WPP tracing. Your customer doesn’t have to have
> all
> > > that stuff. You send your customer a very limited toolset, your
> customer
> > > sends you binary trace that is essentially unreadable, and you
process
> > it
> > > to get the debug info you need.
> >
> > You skipped right over my point. The “very limited toolset” you
mentioned
> > was exactly what I was talking about. However, I just did a quick
perusal
> > of the resource kit, and those tools, such as tracelog, appear to ship
> with
> > it as well, and it is a free download as well here:
> >
> >
>
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/tracelog
> > -o.asp
> >
> > I should have checked that first.
> >
> > –
> > Bill McKenzie
> > Compuware Corporation
> > Watch your IRPs/IRBs/URBs/SRBs/NDIS pkts with our free WDMSniffer tool:
> > http://frontline.compuware.com/nashua/patches/utility.htm
> >
> >
> > “Phil Barila” wrote in message
> > news:xxxxx@ntdev…
> > >
> > > That’s the point of WPP tracing. Your customer doesn’t have to have
> all
> > > that stuff. You send your customer a very limited toolset, your
> customer
> > > sends you binary trace that is essentially unreadable, and you
process
> > it
> > > to get the debug info you need. Please look at WPP tracing again.
> > > Especially, look at the OSR articles:
> > > http://www.osronline.com/article.cfm?id=200
> > > http://www.osronline.com/article.cfm?id=213
> > >
> > > Phil
> > > –
> > > Philip D. Barila Windows DDK MVP
> > > Seagate Technology, LLC
> > > (720) 684-1842
> > > As if I need to say it: Not speaking for Seagate.
> > >
> > > “Sanjay Chadda” wrote in message
> > news:xxxxx@ntdev…
> > >
> > > Here is what I am looking for to implement:
> > >
> > > We have a driver packaged into a product. It gets installed on
> > > customer’s machine and sometimes things are
> > > Not working. It could be due to some failure case in driver, but we
will
> > > never know that unless we log those debug messages coming out of the
> > > driver. So, I need to log those DbgPrint messages somewhere which the
> > > customer could pass on to us and we can take a look at them. That’s
why
> > > I thought of implementing a scheme where we can put those debug
messages
> > > to a file.
> > >
> > > Also, I tried WPP tracing and its too cumbersome. To get the errors in
> > > human readable form, one needs to run tools from DDK like - tracelog,
> > > tracefmt, traceview, etc…
> > >
> > > Now, for an end user customer deploying this product, we don’t expect
> > > that he will be running these tools from DDK (which means he needs to
> > > have DDK installed) or WINDBG also (as pointed in case 4). Its hard to
> > > convince customers to have these tools installed on their machine.
> > >
> > > What I am looking for is, when somehting fails, the customer sends us
a
> > > log file (which has all debug messages logged from the driver) and
then
> > > I look up in source code to figure out what went wrong.
> > >
> > > Sanjay
> > >
> > > >-----Original Message-----
> > > >From: Roddy, Mark [mailto:xxxxx@stratus.com]
> > > >Sent: Wednesday, August 06, 2003 6:28 AM
> > > >To: Windows System Software Developers Interest List
> > > >Subject: [ntdev] Re: Debugging
> > > >
> > > >
> > > >Well lets see:
> > > >
> > > >1) its too complicated and invasive - debug tracing has to be
> > > >light-weight or the tracing so alters program behavior that it
> > > >invalidates its own usefulness.
> > > >
> > > >2) equivalent, well designed functionality, already exists as
> > > >WPP tracing, so you are re-inventing the wheel, and your wheel
> > > >isn’t even a superior design.
> > > >
> > > >3) you need to build a front end spooler to handle log
> > > >messages at IRQL > PASSIVE_LEVEL, so what appears to be a
> > > >simple idea becomes complicated rather quickly, see (1) above.
> > > >
> > > >4) windbg will spool console output to a file. Perhaps that is
> > > >all you really need?
> > > >
> > > >
> > > >
> > > >=====================
> > > >Mark Roddy
> > > >Hollis Technology Solutions
> > > >www.hollistech.com
> > > >xxxxx@hollistech.com
> > > >
> > > >
> > > >-----Original Message-----
> > > >From: Sanjay Chadda [mailto:xxxxx@neoteris.com]
> > > >Sent: Tuesday, August 05, 2003 6:25 PM
> > > >To: Windows System Software Developers Interest List
> > > >Subject: [ntdev] Re: Debugging
> > > >
> > > >
> > > >Yes, I agree. It shd be IRQL = PASSIVE_LEVEL.
> > > >
> > > >>P.S. debug logging to a file directly from kernel mode is generally
a
> > > >>useless idea.
> > > >
> > > >Why do you say this? Because of performance reasons?
> > > >Or maybe we can get the debug messages in the driver thru an
> > > >IOCTL in user mode app. The user mode App could then write to a file.
> > > >
> > > >
> > > >>-----Original Message-----
> > > >>From: Roddy, Mark [mailto:xxxxx@stratus.com]
> > > >>Sent: Tuesday, August 05, 2003 10:44 AM
> > > >>To: Windows System Software Developers Interest List
> > > >>Subject: [ntdev] Re: Debugging
> > > >>
> > > >>
> > > >>
> > > >>RTFM.
> > > >>
> > > >>“Callers of ZwCreateFile must be running at IRQL = PASSIVE_LEVEL.”
> > > >>“Callers of ZwWriteFile must be running at IRQL = PASSIVE_LEVEL.”
> > > >>
> > > >>P.S. debug logging to a file directly from kernel mode is generally
a
> > > >>useless idea.
> > > >>
> > > >>
> > > >>=====================
> > > >>Mark Roddy
> > > >>Hollis Technology Solutions
> > > >>www.hollistech.com
> > > >>xxxxx@hollistech.com
> > > >>
> > > >>
> > > >>-----Original Message-----
> > > >>From: Sanjay Chadda [mailto:xxxxx@neoteris.com]
> > > >>Sent: Tuesday, August 05, 2003 1:34 PM
> > > >>To: Windows System Software Developers Interest List
> > > >>Subject: [ntdev] Re: Debugging
> > > >>
> > > >>
> > > >>Hi,
> > > >>I am also working on sending some debug output to a file on
> > > >disk. I am
> > > >>using same ZwCreateFile() &
> > > >>ZwWriteFile() kernel calls to do it. But I get a page fault on
> > > >>the call to ZwCreateFile(). I am checking in code that I do
> > > >>this only if IRQL <= DISPATCH_LEVEL. Any ideas why page fault
> > > >>would occur? I am using following
> > > >>code: maybe I am using some wrong flags or what??
> > > >>
> > > >> InitializeObjectAttributes (&objectAttributes,
> > > >>
> > > >>(PUNICODE_STRING)&fileName,
> > > >>
> > > >>OBJ_CASE_INSENSITIVE,
> > > >> NULL,
> > > >> NULL );
> > > >>
> > > >> status = ZwCreateFile(&FileHandle,
> > > >> FILE_APPEND_DATA,
> > > >> &objectAttributes,
> > > >> &IoStatus,
> > > >> 0,
> > > >> FILE_ATTRIBUTE_NORMAL,
> > > >> FILE_SHARE_WRITE,
> > > >> FILE_OPEN_IF,
> > > >> FILE_SYNCHRONOUS_IO_NONALERT,
> > > >> NULL,
> > > >> 0 );
> > > >>
> > > >>Sanjay
> > > >>>-----Original Message-----
> > > >>>From: Shaun [mailto:xxxxx@sdlabs.net]
> > > >>>Sent: Monday, May 26, 2003 6:42 AM
> > > >>>To: NT Developers Interest List
> > > >>>Subject: [ntdev] Re: Debugging
> > > >>>
> > > >>>
> > > >>>You can write to files using the ZwCreateFile() &
> > > >>>ZwWriteFile() kernel calls. If you want to just capture trace,
simply
> > > >>>use DbgPrint and either use a debugger (such as the DDK WinDbg or
> > > >>>Numega SoftIce) or use a utility called DebugView from SysInternals
> > > >>>(http://www.sysinternals.com/ntw2k/utilities.shtml)
> > > >>>that will capture the DbgPrint and allow you to view/save it.
> > > >>>
> > > >>>Shaun
> > > >>>
> > > >>>Monday, May 26, 2003, 2:29:17 PM, you wrote:
> > > >>>
> > > >>>TS> Hello,
> > > >>>
> > > >>>TS> I am moving some dll code to driver side in 2K. ( Using
deviceio
> > > >>>TS> calls) Is there any facility of printing messages to file
> > > >>>in driver
> > > >>>TS> code. ( For Debudding)
> > > >>>
> > > >>>TS> As i Couldn’t get any status (tracking) of the driver
> > > >>>function, i am
> > > >>>TS> interested in
> > > >>>TS> getting track of the code.
> > > >>>
> > > >>>TS> Any help ?
> > > >>>TS> Thanks in advance,
> > > >>>TS> Tushar
> > > >>>
> > > >>>
> > > >>>
> > > >>>TS> —
> > > >>>TS> You are currently subscribed to ntdev as: xxxxx@sdlabs.net To
> > > >>>TS> unsubscribe send a blank email to
> > > >xxxxx@lists.osr.com
> > > >>>
> > > >>>
> > > >>>
> > > >>>—
> > > >>>You are currently subscribed to ntdev as: xxxxx@neoteris.com To
> > > >>>unsubscribe send a blank email to xxxxx@lists.osr.com
> > > >>>
> > > >>
> > > >>
> > > >>—
> > > >>Questions? First check the Kernel Driver FAQ at
> > > >>http://www.osronline.com/article.cfm?id=>256
> > > >>
> > > >>You are currently
> > > >>subscribed to ntdev as:
> > > >>xxxxx@stratus.com To unsubscribe send a blank email to
> > > >>xxxxx@lists.osr.com
> > > >>
> > > >>
> > > >>—
> > > >>Questions? First check the Kernel Driver FAQ at
> > > >>http://www.osronline.com/article.cfm?id=>256
> > > >>
> > > >>You are currently
> > > >>subscribed to ntdev as:
> > > >>xxxxx@neoteris.com To unsubscribe send a blank email to
> > > >>xxxxx@lists.osr.com
> > > >>
> > > >
> > > >
> > > >—
> > > >Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=256
> > > >
> > > >You are currently subscribed to ntdev as: xxxxx@stratus.com
> > > >To unsubscribe send a blank email to xxxxx@lists.osr.com
> > > >
> > > >
> > > >—
> > > >Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=>256
> > > >
> > > >You are currently
> > > >subscribed to ntdev as:
> > > >xxxxx@neoteris.com
> > > >To unsubscribe send a blank email to xxxxx@lists.osr.com
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>