etw trace event message

Dec 3, 2012 at 7:32 PM

Hi,

Does anyone have any idea how to print out the event message in managed code?  

PrintProperties() doesn’t have it. GetPayloadProperty("EventMessage") returns null. Simply printout the etwEvent.EventMessage gives something like “Miniport %4 %1, had event %5”, and cannot interpret the values in it.

Thanks!

Dec 4, 2012 at 1:59 PM

What API set are you referring to?    I would have expected your question to be about the TraceEvent library, but it does not have any APIs like 'GetPayloadProperty.

For what it is worth, TraceEvent DOES have the ability to do what you want, but depending on details of your scenario the details of how to do it change.   Can you describe your scenario a bit more?

Dec 4, 2012 at 4:59 PM
Edited Dec 4, 2012 at 5:01 PM

The scenario is simply setup a waiter for power transition event (I have the providerID and eventID). And when it occurs, capture it in real time and deliver the result (the value of event message) to another application.

I talked to another guy yesterday. It seems like it is a bug for now that ETW processing dll I am using does not support filling in these payload properties in the event message, and therefore I see something like “Miniport %4 %1, had event %5”. 

Dec 5, 2012 at 6:29 PM

What ETW processing DLL are you using?