How to use WPP Tracing in user mode application with WppEnabled flag

721 Views Asked by At

I want to use WPP Tracing in user mode application as below:

<ItemDefinitionGroup>
    <ClCompile>
      <WppEnabled>true</WppEnabled>
      <WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
      <WppKernelMode>false</WppKernelMode>
    </ClCompile>
  </ItemDefinitionGroup>

That is just change the .vcxproj file to add WppEnabled flag, maybe I need to add more flags. I tried to do it like this, but I failed.

I know I can use tracewpp.exe command to generate the tmh file and use wpp tracing, but it is not allowed. My Platform Toolset is Visual Studio 2015 (v140). Is it feasible to use WppEnabled flag in my user mode project to enable WPP tracing, and how? Thank you!

1

There are 1 best solutions below

0
On

The wdk support for wpp in visual studio builds only works if your project uses the wdk's platform toolset.

Last time I used wpp with visual studio, I eventually gave up on the wdk wpp settings and just wrote my own custom build step to run tracewpp.