Edit for Visual Studio 2012:
It appears you've reached the analysis limit of the preprocessor in Visual Studio 2012's IntelliSense engine. If you replace the TraceEvents
reference with WPP_Call_Foo_cppNNN
, it actually resolves the identifier without problems (until you rebuild the solution and the tmh header changes).
The solution is to load the solution in Visual Studio 2013, and choose to not upgrade the compiler toolchain, thus preserving backwards compatibility with Visual Studio 2012.
Previous Answer for Visual Studio 2013:
This was tested in Visual Studio 2013, so it may not apply to Visual Studio 2012. I couldn't find a release of the WDK that supports Visual Studio 2012, so you'll need to let me know how to configure the environment if the following steps do not work.
After building your project (to ensure the .tmh files exist), execute the Project → Rescan Solution command.
I also recommend you associate the files with the C++ editor through the following steps:
- Open Tools → Options... → Text Editor → File Extension
- Associate extension tmh with editor Microsoft Visual C++