WPP Tracing: Customizing DoTraceMessage.

Hi ALL:

I am trying to replace the DoTraceMessage API with my own, but I cannot even get my code to compile. Any help will be greatly appreciated.

I added the following to my source file:
RUN_WPP=$(SOURCES) -km -func:DebugTraceR((INDENT,LEVEL,Format,…))
DebugTraceR is defined as following:
void DebugTraceR(int INDENT, UInt64 LEVEL, char *Format, …)
The build fails with the following error:
error : (ParseSrcCallback)DebugTraceR requires ((args))
Thanks in advance,
Ilya.

Hi,

You shouldn’t be defining the tracing function yourself anywhere, it’s
automatically generated for you.

AFAIK the tracing templates supplied in the DDK don’t provide this level of
customization to the tracing message. I think that if you want to change the
format of the output (such as adding an indent) it’s going to require that
you create your own WPP templates, which is probably more trouble than it’s
worth. You can browse through the \bin\wppconfig directory of the DDK to get
an idea as to what you’d be getting yourself into.

Regards,

-scott


Scott Noone
Software Engineer
OSR Open Systems Resources, Inc.
http://www.osronline.com

wrote in message news:xxxxx@ntfsd…
Hi ALL:

I am trying to replace the DoTraceMessage API with my own, but I cannot even
get my code to compile. Any help will be greatly appreciated.

I added the following to my source file:
RUN_WPP=$(SOURCES) -km -func:DebugTraceR((INDENT,LEVEL,Format,…))
DebugTraceR is defined as following:
void DebugTraceR(int INDENT, UInt64 LEVEL, char *Format, …)
The build fails with the following error:
error : (ParseSrcCallback)DebugTraceR requires ((args))
Thanks in advance,
Ilya.

No this is the standard way to tell WPP your program has a function
similar to DoTraceMessage and you want WPP to use that to generate
tracing.

It is basically correct, but you don’t need to define DebugTraceR

Remove this
void DebugTraceR(int INDENT, UInt64 LEVEL, char *Format, …)

To a header file that you don’t include when building with WPP enabled.

WPP may be seeing the function definition and treating it as a call.

Also are all of your calls to DebugTraceR really using double braces
(()) if not remove them from the -func call.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Scott Noone
Sent: Thursday, August 17, 2006 11:10 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] WPP Tracing: Customizing DoTraceMessage.

Hi,

You shouldn’t be defining the tracing function yourself anywhere, it’s
automatically generated for you.

AFAIK the tracing templates supplied in the DDK don’t provide this level
of
customization to the tracing message. I think that if you want to change
the
format of the output (such as adding an indent) it’s going to require
that
you create your own WPP templates, which is probably more trouble than
it’s
worth. You can browse through the \bin\wppconfig directory of the DDK to
get
an idea as to what you’d be getting yourself into.

Regards,

-scott


Scott Noone
Software Engineer
OSR Open Systems Resources, Inc.
http://www.osronline.com

wrote in message news:xxxxx@ntfsd…
Hi ALL:

I am trying to replace the DoTraceMessage API with my own, but I cannot
even
get my code to compile. Any help will be greatly appreciated.

I added the following to my source file:
RUN_WPP=$(SOURCES) -km -func:DebugTraceR((INDENT,LEVEL,Format,…))
DebugTraceR is defined as following:
void DebugTraceR(int INDENT, UInt64 LEVEL, char *Format, …)
The build fails with the following error:
error : (ParseSrcCallback)DebugTraceR requires ((args))
Thanks in advance,
Ilya.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com