Answered by:
wpptrace, VS2019 -- bad template?

Question
-
Hi,
Using the latest VS2019 & SDK/WDK I'm having trouble using wpptrace generator. I'm using a stock Microsoft template that works using the 8.1 SDK/WDK, but fails using the latest.
The specific error is:
tracewpp.exe -cfgdir:"C:\Program Files (x86)\Windows Kits\10\bin\wppconfig\rev1" -odir:. -scan:C:\wrk\git\main\src\util\wpptrace\wppcommon.h -p:fwutil myfile.cpp
C:\Program Files (x86)\Windows Kits\10\bin\wppconfig\rev1\provider.tpl : error wpp: Var not found: Provider
tracewpp : error wpp: Fatal error: Template parse error
Can anyone help me find a solution?
- Edited by wimcolgate Sunday, November 10, 2019 6:49 PM
Answers
-
The wppconfig templates in C:\Program Files (x86)\Windows Kits\10\bin\wppconfig\rev1 are from an early release of Windows 10 SDK, 10.0.14393 or so. If you used this wppconfig folder with a tracewpp.exe from the same version of the SDK, it should work.
Based on your error message, it appears that the tracewpp.exe you are running is from a much newer release of Windows 10, 10.0.18362 or so. That won't work with the provider.tpl from 10.0.14393. The old provider.tpl references variable names that the new tracewpp.exe no longer supports.
The old provider.tpl/manifest.tpl templates could be used generate a partial manifest and corresponding header. Partial manifests are no longer supported by tracewpp.
In recent SDKs, provider.tpl/manifest.tpl have been rewritten to generate a full manifest and corresponding header. The use of these templates is enabled by passing the -man parameter on the tracewpp command line (these templates should not be used via the -gen parameter). Note that the -man parameter, the provider.tpl template, and the manifest.tpl template are new features and there may be minor behavior changes to them in future versions of the Windows SDK.
- Marked as answer by Brian CatlinModerator Friday, November 15, 2019 7:16 PM
All replies
-
-
The wppconfig templates in C:\Program Files (x86)\Windows Kits\10\bin\wppconfig\rev1 are from an early release of Windows 10 SDK, 10.0.14393 or so. If you used this wppconfig folder with a tracewpp.exe from the same version of the SDK, it should work.
Based on your error message, it appears that the tracewpp.exe you are running is from a much newer release of Windows 10, 10.0.18362 or so. That won't work with the provider.tpl from 10.0.14393. The old provider.tpl references variable names that the new tracewpp.exe no longer supports.
The old provider.tpl/manifest.tpl templates could be used generate a partial manifest and corresponding header. Partial manifests are no longer supported by tracewpp.
In recent SDKs, provider.tpl/manifest.tpl have been rewritten to generate a full manifest and corresponding header. The use of these templates is enabled by passing the -man parameter on the tracewpp command line (these templates should not be used via the -gen parameter). Note that the -man parameter, the provider.tpl template, and the manifest.tpl template are new features and there may be minor behavior changes to them in future versions of the Windows SDK.
- Marked as answer by Brian CatlinModerator Friday, November 15, 2019 7:16 PM
-
Thanks for shedding some light on the issue.
If I look at my VS2019 installation, I have the Windows 10 SDK version 10.0.18362.0 installed, and no other. How did I manage to install an old provider.tpl? Or was the older templates bundled in the newer SDK regardless?
Is there any clear and concise documentation on how to use -man, and what behavior changes we might expect when using it?
-
I'm not exactly sure how the SDK versioning works, but the following folder seems to have older WPP templates:
C:\Program Files (x86)\Windows Kits\10\bin\wppconfig\rev1
And the following folder seems to have newer templates:
C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\WppConfig\Rev1
If you use a tracewpp.exe from a 10.0.18362.0 folder, you would want to match it with the templates from a 10.0.18362.0 folder.
At present, the use of -man is still in "preview", so documentation for it is not yet written. However, it is mostly stable at this point, so breaking changes are expected to be relatively minor.
-