如何在具有WppEnabled标志的用户模式应用程序中使用WPP跟踪 [英] How to use WPP Tracing in user mode application with WppEnabled flag

查看:157
本文介绍了如何在具有WppEnabled标志的用户模式应用程序中使用WPP跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想在用户模式应用程序中使用WPP跟踪,如下所示:

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

这只是改变.vcxproj文件来添加WppEnabled标志,也许我需要添加更多标志。我试着像

这个
,但我失败了。


我知道我可以使用tracewpp.exe命令生成tmh文件并使用wpp跟踪,但不允许。我的平台工具集是Visual Studio 2015(v140)。在我的用户模式项目中使用WppEnabled标志来启用WPP跟踪是否可行,以及如何实现?感谢
你!

解决方案

你好
ShenghuaChen


欢迎来到MSDN论坛。


我建议你添加更多标志。根据我的搜索结果。 
如果只想在b.c文件上调用tracewpp.exe。我觉得你应该这样写:


< ItemGroup >


&NBSP;&NBSP;&NBSP;
< ClCompile
包含 = " ac "
/>


<跨度>&NBSP;&NBSP;&NBSP;
< ClCompile
包含 = " bc " < span lang ="EN"style ="color:blue; font-family:'Courier New'; font-size:10pt">>


<跨度>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< WppEnabled > true < / WppEnabled >


   
< / < span lang ="EN"style ="color:#a31515; font-family:'Courier New'; font-size:10pt"> ClCompile >


< / ItemGroup>


上面的示例调用文件bc上的tracewpp.exe,因为对于这些输入,WappEabled元数据设置为TRUE,不调用文件ac。这些输入的开关也不同。


如果您还有其他信息,请随时与我们联系。


最好的问候,


Hart


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!

解决方案

Hi ShenghuaChen,

Welcome to MSDN forum.

I would suggest you to add more flags. Based on my search.  When you want to invoke tracewpp.exe only on b.c file. I feel you should write like these:

<ItemGroup>

    <ClCompile Include="a.c" />

    <ClCompile Include="b.c">

        <WppEnabled>true</WppEnabled>

    </ClCompile>

</ItemGroup>

The example above invokes tracewpp.exe on the file b.c because the WappEabled metadata is set to TRUE for these inputs, the file a.c is not invoked. The switches will also be different for these inputs.

If you have something else, please feel free to contact us.

Best Regards,

Hart


这篇关于如何在具有WppEnabled标志的用户模式应用程序中使用WPP跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆