none
How do I generate WPP trace messages from a header file? RRS feed

  • Question

  • Before Visual Studio 2012 the WPP preprocessor could be configured to process header files as described herehttp://msdn.microsoft.com/en-us/library/ff546762.aspx.

    How can the same be done with Visual Studio? The problem is getting the header file into the preprocessor argument list. Configuring the file extensions (-ext:.cpp.CPP.h.H) works, but when i check the compile log file, header files were not added to the preprocessor command line.

    With regards

    Jens

    Thursday, November 29, 2012 10:12 AM

All replies

  • Before Visual Studio 2012 the WPP preprocessor could be configured to process header files as described here http://msdn.microsoft.com/en-us/library/ff546762.aspx.

    How can the same be done with Visual Studio? The problem is getting the header file into the preprocessor argument list. Configuring the file extensions (-ext:.cpp.CPP.h.H) works, but when i check the compile log file, header files were not added to the preprocessor command line.

    With regards

    Jens

    • Moved by Barry Wang Friday, November 30, 2012 6:39 AM Driver Development (From:Visual Studio Setup and Installation)
    • Merged by Doron Holan [MSFT] Friday, November 30, 2012 7:41 AM
    Thursday, November 29, 2012 10:09 AM
  • it is integrated into the project configuration UI, http://msdn.microsoft.com/en-us/library/windows/hardware/ff556201(v=vs.85).aspx lists all of the properties and how they map to the command line

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Doron Holan [MSFT] Thursday, November 29, 2012 8:15 PM
    • Unmarked as answer by JoBiNo Friday, November 30, 2012 2:39 PM
    Thursday, November 29, 2012 8:15 PM
  • Hi Jens,

    Thanks for your post.

    Since you are asking a Driver Development issue, I've moved it to the right forum.

    Regards,


    Barry Wang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, November 30, 2012 6:40 AM
  • i just verified that the -ext paramter does show up on the tracewpp command line when editing the File Extensions property in the project properties. You have to be careful about which config and platform you are editing when you make the changes, you probably want to select Configuration: All Configurations, Platform: All Platforms before making the change in the UI.  if you want to see the change on the command line you have to close/reopen the project for the changes to be written to disk.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, November 30, 2012 7:50 AM
  • Hi, thanks for your efforts,

    as i stated above, my problem is not configuring via the UI, i believe i've done everything right. The WPP preprocessor is not generating any *.tmh files for my header files.

    From the compile.log i see, no header files are added to the command line:

    RunWpp:
             C:\Program Files (x86)\Windows Kits\8.0\bin\x86\tracewpp.exe -ext:.cpp.CPP.h.H -preserveext:.cpp.CPP.h.H /I..\src -cfgdir:"C:\Program Files (x86)\Windows Kits\8.0\bin\wppconfig\rev1" -ini:"..\src\localwpp.ini" -scan:"..\src\driver.h" -odir:"C:\Work\Jens\projects\SVN\develop\trunk\client\wfpfilter\project\x64\Win8Release\\" -km ..\..\mm_process\src\sifmsgs.cpp ..\src\chainedhashtable.cpp ..\src\collection.cpp ..\src\configuration.cpp ..\src\device.cpp ..\src\dnsfilter.cpp ..\src\dnsfw.cpp ..\src\dnsrequests.cpp ..\src\driver.cpp ..\src\filterhelper.cpp ..\src\flowtable.cpp ..\src\icmpfilter.cpp ..\src\iflist.cpp ..\src\msgobject.cpp ..\src\networkfilter.cpp ..\src\pendingopset.cpp ..\src\portfw.cpp ..\src\sockettable.cpp ..\src\tcpfilter.cpp ..\src\tcptable.cpp ..\src\timeout.cpp ..\src\udpfilter.cpp ..\src\udptable.cpp ..\src\wfphelper.cpp

    In the old build-process with file SOURCE i added the header files to "RUN_WPP" and everything worked fine. With Studio 2012 i see no option to include header files, and i believe i have to manually edit the .vcxproj to achieve this, but i cannot find a sample and each guess i made was not working.

    Jens

    Friday, November 30, 2012 2:37 PM