├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── TraceWpp.sln
├── TraceWpp
├── MMaitre.TraceWpp.nuspec
├── MMaitre.TraceWpp.targets
├── TraceWpp.h
├── TraceWpp.vcxproj
├── TraceWpp.vcxproj.filters
├── pack.cmd
└── publish.cmd
├── TraceWppTestApp
├── TraceWppTestApp.Shared
│ ├── App.xaml
│ ├── App.xaml.cpp
│ ├── App.xaml.h
│ ├── TraceWppTestApp.Shared.vcxitems
│ ├── TraceWppTestApp.Shared.vcxitems.filters
│ ├── pch.cpp
│ └── pch.h
├── TraceWppTestApp.Windows
│ ├── Assets
│ │ ├── Logo.scale-100.png
│ │ ├── SmallLogo.scale-100.png
│ │ ├── SplashScreen.scale-100.png
│ │ └── StoreLogo.scale-100.png
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cpp
│ ├── MainPage.xaml.h
│ ├── Package.appxmanifest
│ ├── TraceWppTestApp.Windows.vcxproj
│ ├── TraceWppTestApp.Windows.vcxproj.filters
│ ├── TraceWppTestApp.Windows_TemporaryKey.pfx
│ └── packages.config
└── TraceWppTestApp.WindowsPhone
│ ├── Assets
│ ├── Logo.scale-240.png
│ ├── SmallLogo.scale-240.png
│ ├── SplashScreen.scale-240.png
│ ├── Square71x71Logo.scale-240.png
│ ├── StoreLogo.scale-240.png
│ └── WideLogo.scale-240.png
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cpp
│ ├── MainPage.xaml.h
│ ├── Package.appxmanifest
│ ├── TraceWppTestApp.WindowsPhone.vcxproj
│ ├── TraceWppTestApp.WindowsPhone.vcxproj.filters
│ └── packages.config
└── TraceWppTestDll
├── TraceWppTestDll.Shared
├── Class1.cpp
├── Class1.h
├── TraceWppTestDll.Shared.vcxitems
├── TraceWppTestDll.Shared.vcxitems.filters
├── module.cpp
├── pch.cpp
└── pch.h
├── TraceWppTestDll.Windows
├── TraceWppTestDll.Windows.vcxproj
├── TraceWppTestDll.Windows.vcxproj.filters
└── packages.config
└── TraceWppTestDll.WindowsPhone
├── TraceWppTestDll.WindowsPhone.vcxproj
├── TraceWppTestDll.WindowsPhone.vcxproj.filters
└── packages.config
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.sln.docstates
8 |
9 | # Build results
10 | [Dd]ebug/
11 | [Dd]ebugPublic/
12 | [Rr]elease/
13 | [Rr]eleases/
14 | x64/
15 | x86/
16 | build/
17 | bld/
18 | [Bb]in/
19 | [Oo]bj/
20 |
21 | # Roslyn cache directories
22 | *.ide/
23 |
24 | # MSTest test Results
25 | [Tt]est[Rr]esult*/
26 | [Bb]uild[Ll]og.*
27 |
28 | #NUNIT
29 | *.VisualState.xml
30 | TestResult.xml
31 |
32 | # Build Results of an ATL Project
33 | [Dd]ebugPS/
34 | [Rr]eleasePS/
35 | dlldata.c
36 |
37 | *_i.c
38 | *_p.c
39 | *_i.h
40 | *.ilk
41 | *.meta
42 | *.obj
43 | *.pch
44 | *.pdb
45 | *.pgc
46 | *.pgd
47 | *.rsp
48 | *.sbr
49 | *.tlb
50 | *.tli
51 | *.tlh
52 | *.tmh
53 | *.tmp
54 | *.tmp_proj
55 | *.log
56 | *.vspscc
57 | *.vssscc
58 | .builds
59 | *.pidb
60 | *.svclog
61 | *.scc
62 |
63 | # Chutzpah Test files
64 | _Chutzpah*
65 |
66 | # Visual C++ cache files
67 | ipch/
68 | *.aps
69 | *.ncb
70 | *.opensdf
71 | *.sdf
72 | *.cachefile
73 |
74 | # Visual Studio profiler
75 | *.psess
76 | *.vsp
77 | *.vspx
78 |
79 | # TFS 2012 Local Workspace
80 | $tf/
81 |
82 | # Guidance Automation Toolkit
83 | *.gpState
84 |
85 | # ReSharper is a .NET coding add-in
86 | _ReSharper*/
87 | *.[Rr]e[Ss]harper
88 | *.DotSettings.user
89 |
90 | # JustCode is a .NET coding addin-in
91 | .JustCode
92 |
93 | # TeamCity is a build add-in
94 | _TeamCity*
95 |
96 | # DotCover is a Code Coverage Tool
97 | *.dotCover
98 |
99 | # NCrunch
100 | _NCrunch_*
101 | .*crunch*.local.xml
102 |
103 | # MightyMoose
104 | *.mm.*
105 | AutoTest.Net/
106 |
107 | # Web workbench (sass)
108 | .sass-cache/
109 |
110 | # Installshield output folder
111 | [Ee]xpress/
112 |
113 | # DocProject is a documentation generator add-in
114 | DocProject/buildhelp/
115 | DocProject/Help/*.HxT
116 | DocProject/Help/*.HxC
117 | DocProject/Help/*.hhc
118 | DocProject/Help/*.hhk
119 | DocProject/Help/*.hhp
120 | DocProject/Help/Html2
121 | DocProject/Help/html
122 |
123 | # Click-Once directory
124 | publish/
125 |
126 | # Publish Web Output
127 | *.[Pp]ublish.xml
128 | *.azurePubxml
129 | # TODO: Comment the next line if you want to checkin your web deploy settings
130 | # but database connection strings (with potential passwords) will be unencrypted
131 | *.pubxml
132 | *.publishproj
133 |
134 | # NuGet Packages
135 | *.nupkg
136 | # The packages folder can be ignored because of Package Restore
137 | **/packages/*
138 | # except build/, which is used as an MSBuild target.
139 | !**/packages/build/
140 | # If using the old MSBuild-Integrated Package Restore, uncomment this:
141 | #!**/packages/repositories.config
142 |
143 | # Windows Azure Build Output
144 | csx/
145 | *.build.csdef
146 |
147 | # Windows Store app package directory
148 | AppPackages/
149 |
150 | # Others
151 | sql/
152 | *.Cache
153 | ClientBin/
154 | [Ss]tyle[Cc]op.*
155 | ~$*
156 | *~
157 | *.dbmdl
158 | *.dbproj.schemaview
159 | *.pfx
160 | *.publishsettings
161 | node_modules/
162 |
163 | # RIA/Silverlight projects
164 | Generated_Code/
165 |
166 | # Backup & report files from converting an old project file
167 | # to a newer Visual Studio version. Backup files are not needed,
168 | # because we have git ;-)
169 | _UpgradeReport_Files/
170 | Backup*/
171 | UpgradeLog*.XML
172 | UpgradeLog*.htm
173 |
174 | # SQL Server files
175 | *.mdf
176 | *.ldf
177 |
178 | # Business Intelligence projects
179 | *.rdl.data
180 | *.bim.layout
181 | *.bim_*.settings
182 |
183 | # Microsoft Fakes
184 | FakesAssemblies/
185 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://www.nuget.org/packages/MMaitre.TraceWpp/)
2 |
3 | WPP Tracing for C++ Universal Store apps
4 | ========
5 |
6 | The [Windows trace PreProcessor](http://msdn.microsoft.com/en-us/library/windows/hardware/ff556204(v=vs.85).aspx) (WPP) provides high-performance tracing for C++ apps. It has low impact on binary size and CPU usage -- even when tracing is turned on -- which makes it suitable for both Debug and Release builds. It is however difficult to set up, especially in Universal Windows/Windows Phone Store apps. This project tries to address that issue.
7 |
8 | ## Initial setup
9 |
10 | Start by installing the [WPP Tracing NuGet package](https://www.nuget.org/packages/MMaitre.TraceWpp/). The package adds a header to the VS project (TraceWpp\TraceWpp.h) and an MSBuild target generating .tmh trace headers during the build. Also install the [WDK](http://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx) to get required WPP config files.
11 |
12 | If using GIT, add '*.tmh' to .gitignore to avoid checking-in generated headers.
13 |
14 | Then create a GUID to identify the trace provider via the 'Tools > Create GUID' menu in Visual Studio. In the following {B5DBB673-AB73-48A3-B004-B8902FA191C3} is used as provider GUID.
15 |
16 | In the pch.h precompiled header define the trace provider:
17 |
18 | ```cpp
19 | // {B5DBB673-AB73-48A3-B004-B8902FA191C3}
20 | #define TraceWpp_Guid (B5DBB673,AB73,48A3,B004,B8902FA191C3)
21 |
22 | #define WPP_CONTROL_GUIDS \
23 | WPP_DEFINE_CONTROL_GUID(TraceWpp_CtrlGuid, TraceWpp_Guid, \
24 | WPP_DEFINE_BIT(TF_Default) \
25 | WPP_DEFINE_BIT(TF_EntryExit))
26 |
27 | #include "TraceWpp\TraceWpp.h"
28 | ```
29 |
30 | TraceWpp.h defines a set of tracing macros:
31 |
32 | - Trace
33 | - TraceFlag
34 | - TraceLevel
35 | - TraceHr
36 | - TraceScope
37 | - TraceScopeCx
38 | - TraceScopeHr
39 |
40 | The first four provide printf-style traces with various parameters. The last three trace function calls.
41 |
42 | In each cpp file add as last include the trace header generated by the preprocessor. Its filename is the cpp file name with a '.tmh' extension appended to it.
43 |
44 | ```cpp
45 | #include "TraceWpp\foo.cpp.tmh"
46 | ```
47 |
48 | When creating a Store app, add the following code to initialize and shut down the trace provider (replacing 'AppName' with some appropriate value):
49 |
50 | ```cpp
51 | App::App()
52 | {
53 | WPP_INIT_TRACING(L"AppName");
54 | Trace(L"@%p Starting", (void*)this);
55 | }
56 |
57 | void App::OnSuspending(Object^ /*sender*/, SuspendingEventArgs^ /*e*/)
58 | {
59 | Trace(L"@%p Stopping", (void*)this);
60 | WPP_CLEANUP();
61 | }
62 | ```
63 |
64 | When creating a Windows Runtime Component DLL, add a file called module.cpp to the VS project with the following content (replacing 'DllName' with some appropriate value):
65 |
66 | ```cpp
67 | #include "pch.h"
68 | #include "TraceWpp\module.cpp.tmh"
69 |
70 | BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
71 | {
72 | switch (reason)
73 | {
74 | case DLL_PROCESS_ATTACH:
75 | DisableThreadLibraryCalls(instance);
76 | WPP_INIT_TRACING(L"DllName");
77 | Trace(L"@ DLL_PROCESS_ATTACH");
78 | break;
79 |
80 | case DLL_PROCESS_DETACH:
81 | Trace(L"@ DLL_PROCESS_DETACH");
82 | WPP_CLEANUP();
83 | break;
84 | }
85 |
86 | return TRUE;
87 | }
88 | ```
89 |
90 | In VS projects targetting Windows, add advapi32.lib as imported static lib under 'Configuration Properties > Linker > Input > Additional Dependencies'. In Windows Phone VS projects the required static libs are already properly imported.
91 |
92 | Disable 'Edit and Continue' used in Debug builds as this breaks WPP trace macro generation: under 'Configuration Properties > C/C++ > General > Debug Information Format' replace 'Program Database for Edit And Continue (/ZI)' by 'Program Database (/Zi)'.
93 |
94 | ## Adding traces
95 |
96 | Trace macros use format strings similar to printf():
97 |
98 | ```cpp
99 | Trace(L"@%p Starting", this);
100 | ```
101 |
102 | One caveat: for C++/CX objects the ```this``` pointer needs to be cast to ```void*``` in trace calls.
103 |
104 | ## Recording traces
105 |
106 | ### Windows
107 |
108 | The logman.exe tool under %windir%\system32 turns trace providers on and off. To start tracing run the following command in an elevated command prompt:
109 |
110 | ```
111 | logman.exe create trace mytrace -p {B5DBB673-AB73-48A3-B004-B8902FA191C3} 0xff 5 -ets -o trace.etl
112 | ```
113 |
114 | Replacing the '-p' option by '-pf' allows controlling more than one provider. The list of providers is stored in a config file with one set of 'GUID flags level' per line.
115 |
116 | To stop tracing run
117 |
118 | ```
119 | logman.exe stop mytrace -ets
120 | ```
121 |
122 | ### Windows Phone
123 |
124 | [Field Medic](http://www.windowsphone.com/en-us/store/app/field-medic/73c58570-d5a7-46f8-b1b2-2a90024fc29c) records traces on Windows Phone. For more details see this [blog](http://mmaitre314.github.io/2014/12/01/field-medic-custom-logging.html). A WPRP profile controlling the trace provider defined above is available [here](http://mmaitre314.github.io/download/TraceWpp.wprp).
125 |
126 | ## Formatting traces
127 |
128 | Once recorded, traces need to be converted from binary trace files (.etl) to text files (.log). The process is the same whether traces were recorded on Windows or Windows Phone.
129 |
130 | Two tools are needed from the Windows SDK: tracepdb.exe and tracefmt.exe. They are located in '%ProgramFiles%\Windows Kits\8.1\bin\x86' on 32b machines and in '%ProgramFiles(x86)%\Windows Kits\8.1\bin\x64' on 64b machines.
131 |
132 | First extract .tmf trace format files from .pdb symbol files:
133 |
134 | ```
135 | tracepdb.exe -f *.pdb -p c:\Symbols\TraceFormat
136 | ```
137 |
138 | Then format the .etl binary traces into text traces:
139 |
140 | ```
141 | set TRACE_FORMAT_SEARCH_PATH=c:\Symbols\TraceFormat
142 | set TRACE_FORMAT_PREFIX=[%9!d!]%8!04X!.%3!04X! %4!s! %!FUNC!
143 | tracefmt.exe -f trace.etl -o trace.log
144 | ```
145 |
146 | The TRACE_FORMAT_PREFIX environment variable can be customized using the format specifiers documented [here](http://msdn.microsoft.com/en-us/library/windows/hardware/ff553941(v=vs.85).aspx). The format used above is '[CpuNumber]ProcessID.ThreadID Time FunctionName'.
147 |
148 | ## Analysing traces
149 |
150 | [TextAnalysisTool.NET](http://dlaa.me/blog/post/3450647) can quickly filter and color traces using string patterns. See this [blog](http://blogs.msdn.com/b/mf/archive/2010/09/09/analyzing-media-foundation-traces.aspx) for more details.
151 |
--------------------------------------------------------------------------------
/TraceWpp.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.31101.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraceWpp", "TraceWpp\TraceWpp.vcxproj", "{C7598266-879C-4ADF-8981-CB90A8E8911C}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TraceWppTestApp", "TraceWppTestApp", "{FBF114BC-4EBF-4006-B8F5-B948768F3891}"
9 | EndProject
10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraceWppTestApp.Shared", "TraceWppTestApp\TraceWppTestApp.Shared\TraceWppTestApp.Shared.vcxitems", "{F6C2DBD8-CF4F-4174-89CB-953A48D24718}"
11 | EndProject
12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraceWppTestApp.Windows", "TraceWppTestApp\TraceWppTestApp.Windows\TraceWppTestApp.Windows.vcxproj", "{538E47AF-B2AC-4F46-8394-22D72D6B0771}"
13 | ProjectSection(ProjectDependencies) = postProject
14 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D} = {3D42A426-318B-4C7D-91A3-10CF0DF7482D}
15 | EndProjectSection
16 | EndProject
17 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraceWppTestApp.WindowsPhone", "TraceWppTestApp\TraceWppTestApp.WindowsPhone\TraceWppTestApp.WindowsPhone.vcxproj", "{A2CD24B8-EFCE-4662-B43A-408D833DEBD6}"
18 | ProjectSection(ProjectDependencies) = postProject
19 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF} = {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}
20 | EndProjectSection
21 | EndProject
22 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TraceWppTestDll", "TraceWppTestDll", "{047C40CC-7CF2-46A5-B9B2-E1956CF462C5}"
23 | EndProject
24 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraceWppTestDll.Shared", "TraceWppTestDll\TraceWppTestDll.Shared\TraceWppTestDll.Shared.vcxitems", "{B33B1B63-9D7A-4070-B073-94DDF14B8C47}"
25 | EndProject
26 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraceWppTestDll.Windows", "TraceWppTestDll\TraceWppTestDll.Windows\TraceWppTestDll.Windows.vcxproj", "{3D42A426-318B-4C7D-91A3-10CF0DF7482D}"
27 | EndProject
28 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraceWppTestDll.WindowsPhone", "TraceWppTestDll\TraceWppTestDll.WindowsPhone\TraceWppTestDll.WindowsPhone.vcxproj", "{1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}"
29 | EndProject
30 | Global
31 | GlobalSection(SharedMSBuildProjectFiles) = preSolution
32 | TraceWppTestDll\TraceWppTestDll.Shared\TraceWppTestDll.Shared.vcxitems*{1c61afdd-ab03-4280-b6af-12347cbc6aef}*SharedItemsImports = 4
33 | TraceWppTestApp\TraceWppTestApp.Shared\TraceWppTestApp.Shared.vcxitems*{f6c2dbd8-cf4f-4174-89cb-953a48d24718}*SharedItemsImports = 9
34 | TraceWppTestDll\TraceWppTestDll.Shared\TraceWppTestDll.Shared.vcxitems*{b33b1b63-9d7a-4070-b073-94ddf14b8c47}*SharedItemsImports = 9
35 | TraceWppTestApp\TraceWppTestApp.Shared\TraceWppTestApp.Shared.vcxitems*{538e47af-b2ac-4f46-8394-22d72d6b0771}*SharedItemsImports = 4
36 | TraceWppTestApp\TraceWppTestApp.Shared\TraceWppTestApp.Shared.vcxitems*{a2cd24b8-efce-4662-b43a-408d833debd6}*SharedItemsImports = 4
37 | TraceWppTestDll\TraceWppTestDll.Shared\TraceWppTestDll.Shared.vcxitems*{3d42a426-318b-4c7d-91a3-10cf0df7482d}*SharedItemsImports = 4
38 | EndGlobalSection
39 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
40 | Debug|ARM = Debug|ARM
41 | Debug|Win32 = Debug|Win32
42 | Debug|x64 = Debug|x64
43 | Release|ARM = Release|ARM
44 | Release|Win32 = Release|Win32
45 | Release|x64 = Release|x64
46 | EndGlobalSection
47 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
48 | {C7598266-879C-4ADF-8981-CB90A8E8911C}.Debug|ARM.ActiveCfg = Release|Win32
49 | {C7598266-879C-4ADF-8981-CB90A8E8911C}.Debug|Win32.ActiveCfg = Release|Win32
50 | {C7598266-879C-4ADF-8981-CB90A8E8911C}.Debug|x64.ActiveCfg = Release|Win32
51 | {C7598266-879C-4ADF-8981-CB90A8E8911C}.Release|ARM.ActiveCfg = Release|Win32
52 | {C7598266-879C-4ADF-8981-CB90A8E8911C}.Release|Win32.ActiveCfg = Release|Win32
53 | {C7598266-879C-4ADF-8981-CB90A8E8911C}.Release|x64.ActiveCfg = Release|Win32
54 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Debug|ARM.ActiveCfg = Debug|ARM
55 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Debug|ARM.Build.0 = Debug|ARM
56 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Debug|ARM.Deploy.0 = Debug|ARM
57 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Debug|Win32.ActiveCfg = Debug|Win32
58 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Debug|Win32.Build.0 = Debug|Win32
59 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Debug|Win32.Deploy.0 = Debug|Win32
60 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Debug|x64.ActiveCfg = Debug|x64
61 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Debug|x64.Build.0 = Debug|x64
62 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Debug|x64.Deploy.0 = Debug|x64
63 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Release|ARM.ActiveCfg = Release|ARM
64 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Release|ARM.Build.0 = Release|ARM
65 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Release|ARM.Deploy.0 = Release|ARM
66 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Release|Win32.ActiveCfg = Release|Win32
67 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Release|Win32.Build.0 = Release|Win32
68 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Release|Win32.Deploy.0 = Release|Win32
69 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Release|x64.ActiveCfg = Release|x64
70 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Release|x64.Build.0 = Release|x64
71 | {538E47AF-B2AC-4F46-8394-22D72D6B0771}.Release|x64.Deploy.0 = Release|x64
72 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Debug|ARM.ActiveCfg = Debug|ARM
73 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Debug|ARM.Build.0 = Debug|ARM
74 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Debug|ARM.Deploy.0 = Debug|ARM
75 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Debug|Win32.ActiveCfg = Debug|Win32
76 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Debug|Win32.Build.0 = Debug|Win32
77 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Debug|Win32.Deploy.0 = Debug|Win32
78 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Debug|x64.ActiveCfg = Debug|Win32
79 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Release|ARM.ActiveCfg = Release|ARM
80 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Release|ARM.Build.0 = Release|ARM
81 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Release|ARM.Deploy.0 = Release|ARM
82 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Release|Win32.ActiveCfg = Release|Win32
83 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Release|Win32.Build.0 = Release|Win32
84 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Release|Win32.Deploy.0 = Release|Win32
85 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6}.Release|x64.ActiveCfg = Release|Win32
86 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Debug|ARM.ActiveCfg = Debug|ARM
87 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Debug|ARM.Build.0 = Debug|ARM
88 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Debug|Win32.ActiveCfg = Debug|Win32
89 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Debug|Win32.Build.0 = Debug|Win32
90 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Debug|x64.ActiveCfg = Debug|x64
91 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Debug|x64.Build.0 = Debug|x64
92 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Release|ARM.ActiveCfg = Release|ARM
93 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Release|ARM.Build.0 = Release|ARM
94 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Release|Win32.ActiveCfg = Release|Win32
95 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Release|Win32.Build.0 = Release|Win32
96 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Release|x64.ActiveCfg = Release|x64
97 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D}.Release|x64.Build.0 = Release|x64
98 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Debug|ARM.ActiveCfg = Debug|ARM
99 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Debug|ARM.Build.0 = Debug|ARM
100 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Debug|Win32.ActiveCfg = Debug|Win32
101 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Debug|Win32.Build.0 = Debug|Win32
102 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Debug|x64.ActiveCfg = Debug|Win32
103 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Release|ARM.ActiveCfg = Release|ARM
104 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Release|ARM.Build.0 = Release|ARM
105 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Release|Win32.ActiveCfg = Release|Win32
106 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Release|Win32.Build.0 = Release|Win32
107 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF}.Release|x64.ActiveCfg = Release|Win32
108 | EndGlobalSection
109 | GlobalSection(SolutionProperties) = preSolution
110 | HideSolutionNode = FALSE
111 | EndGlobalSection
112 | GlobalSection(NestedProjects) = preSolution
113 | {F6C2DBD8-CF4F-4174-89CB-953A48D24718} = {FBF114BC-4EBF-4006-B8F5-B948768F3891}
114 | {538E47AF-B2AC-4F46-8394-22D72D6B0771} = {FBF114BC-4EBF-4006-B8F5-B948768F3891}
115 | {A2CD24B8-EFCE-4662-B43A-408D833DEBD6} = {FBF114BC-4EBF-4006-B8F5-B948768F3891}
116 | {B33B1B63-9D7A-4070-B073-94DDF14B8C47} = {047C40CC-7CF2-46A5-B9B2-E1956CF462C5}
117 | {3D42A426-318B-4C7D-91A3-10CF0DF7482D} = {047C40CC-7CF2-46A5-B9B2-E1956CF462C5}
118 | {1C61AFDD-AB03-4280-B6AF-12347CBC6AEF} = {047C40CC-7CF2-46A5-B9B2-E1956CF462C5}
119 | EndGlobalSection
120 | EndGlobal
121 |
--------------------------------------------------------------------------------
/TraceWpp/MMaitre.TraceWpp.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MMaitre.TraceWpp
5 | WPP Tracing
6 | $NuGetVersion$
7 | Matthieu Maitre
8 | Matthieu Maitre
9 | https://raw.githubusercontent.com/mmaitre314/VideoEffect/master/LICENSE
10 | https://github.com/mmaitre314/TraceWpp
11 | false
12 | High-performance tracing for C++ Windows/Windows Phone Store apps.
13 | Enables Windows trace PreProcessor (WPP) in Windows/Windows Phone Store apps. Traces are mostly unstructured (aka printf-style tracing). For documentation see https://github.com/mmaitre314/TraceWpp .
14 | Copyright © 2014, Matthieu Maitre. All rights reserved.
15 | Native WinRT WPP Tracing
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/TraceWpp/MMaitre.TraceWpp.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $(ExtensionsToDeleteOnClean);*.tmh
6 |
7 |
8 |
9 |
10 | *.tmh
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/TraceWpp/TraceWpp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // #define TRACE_LEVEL_NONE 0 // Tracing is not on
4 | // #define TRACE_LEVEL_CRITICAL 1 // Abnormal exit or termination
5 | // #define TRACE_LEVEL_FATAL 1 // Deprecated name for Abnormal exit or termination
6 | // #define TRACE_LEVEL_ERROR 2 // Severe errors that need logging
7 | // #define TRACE_LEVEL_WARNING 3 // Warnings such as allocation failure
8 | // #define TRACE_LEVEL_INFORMATION 4 // Non-error useful information
9 | // #define TRACE_LEVEL_VERBOSE 5 // Detailed traces from intermediate steps and function entry-exit
10 |
11 | #define TRACE_IS_ENABLED(LEVEL, FLAGS) (WPP_LEVEL_ENABLED(FLAGS) && WPP_CONTROL(WPP_BIT_ ## FLAGS).Level >= LEVEL)
12 |
13 | // Note: The use of MYPARAM, MYPARAM2, etc. below is to avoid name collisions for WPP_*_LOGGER macros
14 |
15 | // MACRO: TraceScope (flags: TF_EntryExit, level: TRACE_LEVEL_VERBOSE)
16 | //
17 | // begin_wpp config
18 | // USEPREFIX(TraceScope, "%!STDPREFIX!");
19 | // FUNC TraceScope(OBJECT);
20 | // USESUFFIX(TraceScope, "@%p exit", (_po));
21 | // end_wpp
22 |
23 | #define WPP_OBJECT_PRE(OBJECT) \
24 | class TT \
25 | { \
26 | public: \
27 | TT(const void* po) \
28 | : _po(po) \
29 | { \
30 | } \
31 | __forceinline ~TT() \
32 | {
33 | #define WPP_OBJECT_POST(OBJECT) \
34 | ; \
35 | } \
36 | const void *_po; \
37 | } _tt(OBJECT);
38 |
39 | #define WPP_OBJECT_LOGGER(OBJECT) WPP_LEVEL_LOGGER(TF_EntryExit)
40 | #define WPP_OBJECT_ENABLED(OBJECT) TRACE_IS_ENABLED(TRACE_LEVEL_VERBOSE, TF_EntryExit)
41 |
42 | // MACRO: TraceScopeCx (flags: TF_EntryExit, level: TRACE_LEVEL_VERBOSE)
43 | //
44 | // begin_wpp config
45 | // USEPREFIX(TraceScopeCx, "%!STDPREFIX!");
46 | // FUNC TraceScopeCx{MYPARAM3=FOO}(OBJECT);
47 | // USESUFFIX(TraceScopeCx, "@%p exit", (const void*)(_po));
48 | // end_wpp
49 |
50 | #define WPP_MYPARAM3_OBJECT_PRE(MYPARAM3, OBJECT) \
51 | class TT \
52 | { \
53 | public: \
54 | TT(Platform::Object^ po) \
55 | : _po(po) \
56 | { \
57 | } \
58 | __forceinline ~TT() \
59 | {
60 | #define WPP_MYPARAM3_OBJECT_POST(MYPARAM3, OBJECT) \
61 | ; \
62 | } \
63 | Platform::Object^ _po; \
64 | } _tt(OBJECT);
65 |
66 | #define WPP_MYPARAM3_OBJECT_LOGGER(MYPARAM3, OBJECT) WPP_LEVEL_LOGGER(TF_EntryExit)
67 | #define WPP_MYPARAM3_OBJECT_ENABLED(MYPARAM3, OBJECT) TRACE_IS_ENABLED(TRACE_LEVEL_VERBOSE, TF_EntryExit)
68 |
69 | // MACRO: TraceScopeHr (flags: TF_EntryExit, level: TRACE_LEVEL_VERBOSE)
70 | //
71 | // begin_wpp config
72 | // USEPREFIX(TraceScopeHr, "%!STDPREFIX!");
73 | // FUNC TraceScopeHr(OBJECT, HR);
74 | // USESUFFIX(TraceScopeHr, "@%p exit%s%!HRESULT!", (_po), ((_ph == nullptr) || SUCCEEDED(*_ph) ? " " : " failed "), (_ph == nullptr ? S_OK : *_ph));
75 | // end_wpp
76 |
77 | #define WPP_OBJECT_HR_PRE(OBJECT, HR) \
78 | class TT \
79 | { \
80 | public: \
81 | TT(const void* po, const HRESULT* ph) \
82 | : _po(po) \
83 | , _ph(ph) \
84 | { \
85 | } \
86 | __forceinline ~TT() \
87 | {
88 | #define WPP_OBJECT_HR_POST(OBJECT, HR) \
89 | ; \
90 | } \
91 | const void *_po; \
92 | const HRESULT *_ph; \
93 | } _tt(OBJECT, HR);
94 |
95 | #define WPP_OBJECT_HR_LOGGER(OBJECT, HR) WPP_LEVEL_LOGGER(TF_EntryExit)
96 | #define WPP_OBJECT_HR_ENABLED(OBJECT, HR) TRACE_IS_ENABLED(TRACE_LEVEL_VERBOSE, TF_EntryExit)
97 |
98 | // MACRO: Trace (flags: TF_Default, level: TRACE_LEVEL_INFORMATION)
99 | //
100 | // begin_wpp config
101 | // USEPREFIX(Trace,"%!STDPREFIX!");
102 | // FUNC Trace{MYPARAM2=FOO}(MSG, ...);
103 | // end_wpp
104 | //
105 |
106 | #define WPP_MYPARAM2_LOGGER(MYPARAM2) WPP_LEVEL_LOGGER(TF_Default)
107 | #define WPP_MYPARAM2_ENABLED(MYPARAM2) TRACE_IS_ENABLED(TRACE_LEVEL_INFORMATION, TF_Default)
108 |
109 | // MACRO: TraceFlag (level: TRACE_LEVEL_INFORMATION)
110 | //
111 | // begin_wpp config
112 | // USEPREFIX(TraceFlag,"%!STDPREFIX!");
113 | // FUNC TraceFlag(FLAGS, MSG, ...);
114 | // end_wpp
115 | //
116 |
117 | #define WPP_FLAGS_LOGGER(FLAGS) WPP_LEVEL_LOGGER(FLAGS)
118 | #define WPP_FLAGS_ENABLED(FLAGS) TRACE_IS_ENABLED(TRACE_LEVEL_INFORMATION, FLAGS)
119 |
120 | // MACRO: TraceLevel
121 | //
122 | // begin_wpp config
123 | // USEPREFIX(TraceLevel,"%!STDPREFIX!");
124 | // FUNC TraceLevel(LEVEL, FLAGS, MSG, ...);
125 | // end_wpp
126 | //
127 |
128 | #define WPP_LEVEL_FLAGS_LOGGER(LEVEL, FLAGS) WPP_LEVEL_LOGGER(FLAGS)
129 | #define WPP_LEVEL_FLAGS_ENABLED(LEVEL, FLAGS) TRACE_IS_ENABLED(LEVEL, FLAGS)
130 |
131 | // MACRO: TraceHr
132 | //
133 | // begin_wpp config
134 | // USEPREFIX(TraceHr,"%!STDPREFIX!(hr=%!HRESULT!)", HR);
135 | // FUNC TraceHr(FLAGS, HR, MSG, ...);
136 | // end_wpp
137 | //
138 |
139 | #define WPP_FLAGS_HR_LOGGER(FLAGS, HR) WPP_LEVEL_LOGGER(FLAGS)
140 | #define WPP_FLAGS_HR_ENABLED(FLAGS, HR) (WPP_LEVEL_ENABLED(FLAGS) && WPP_CONTROL(WPP_BIT_ ## FLAGS).Level >= (SUCCEEDED(HR) ? TRACE_LEVEL_VERBOSE : TRACE_LEVEL_ERROR))
141 |
142 | // Workaround for a missing declaration in the Windows Phone 8.1 version of evntrace.h
143 | #define WPP_REGISTER_TRACE_GUIDS RegisterTraceGuidsW
144 |
--------------------------------------------------------------------------------
/TraceWpp/TraceWpp.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release
6 | Win32
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {C7598266-879C-4ADF-8981-CB90A8E8911C}
20 | MakeFileProj
21 |
22 |
23 |
24 | Makefile
25 | false
26 | v120
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | WIN32;NDEBUG;$(NMakePreprocessorDefinitions)
37 | pack.cmd
38 | pack.cmd
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/TraceWpp/TraceWpp.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/TraceWpp/pack.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal
3 |
4 | set VERSION=1.0.4
5 |
6 | set OUTPUT=c:\NuGet\
7 |
8 | %OUTPUT%nuget.exe pack MMaitre.TraceWpp.nuspec -OutputDirectory %OUTPUT%Packages -Prop NuGetVersion=%VERSION% -NoPackageAnalysis
9 |
--------------------------------------------------------------------------------
/TraceWpp/publish.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal
3 |
4 | set VERSION=1.0.4
5 |
6 | set OUTPUT=c:\NuGet\
7 |
8 | %OUTPUT%nuget.exe push %OUTPUT%Packages\MMaitre.TraceWpp.%VERSION%.nupkg
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Shared/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Shared/App.xaml.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // App.xaml.cpp
3 | // Implementation of the App class.
4 | //
5 |
6 | #include "pch.h"
7 | #include "MainPage.xaml.h"
8 |
9 | #include "TraceWpp\App.xaml.cpp.tmh"
10 |
11 | using namespace TraceWppTestApp;
12 |
13 | using namespace Platform;
14 | using namespace Windows::ApplicationModel;
15 | using namespace Windows::ApplicationModel::Activation;
16 | using namespace Windows::Foundation;
17 | using namespace Windows::Foundation::Collections;
18 | using namespace Windows::UI::Xaml::Media::Animation;
19 | using namespace Windows::UI::Xaml;
20 | using namespace Windows::UI::Xaml::Controls;
21 | using namespace Windows::UI::Xaml::Controls::Primitives;
22 | using namespace Windows::UI::Xaml::Data;
23 | using namespace Windows::UI::Xaml::Input;
24 | using namespace Windows::UI::Xaml::Interop;
25 | using namespace Windows::UI::Xaml::Media;
26 | using namespace Windows::UI::Xaml::Navigation;
27 |
28 | // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227
29 |
30 | ///
31 | /// Initializes the singleton application object. This is the first line of authored code
32 | /// executed, and as such is the logical equivalent of main() or WinMain().
33 | ///
34 | App::App()
35 | {
36 | WPP_INIT_TRACING(L"TraceWppTestApp");
37 | Trace(L"@%p Starting", (void*)this);
38 |
39 | InitializeComponent();
40 | Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
41 |
42 | auto obj = ref new TraceWppTestDll::Class1();
43 | }
44 |
45 | ///
46 | /// Invoked when the application is launched normally by the end user. Other entry points
47 | /// will be used when the application is launched to open a specific file, to display
48 | /// search results, and so forth.
49 | ///
50 | /// Details about the launch request and process.
51 | void App::OnLaunched(LaunchActivatedEventArgs^ e)
52 | {
53 | #if _DEBUG
54 | if (IsDebuggerPresent())
55 | {
56 | DebugSettings->EnableFrameRateCounter = true;
57 | }
58 | #endif
59 |
60 | auto rootFrame = dynamic_cast(Window::Current->Content);
61 |
62 | // Do not repeat app initialization when the Window already has content,
63 | // just ensure that the window is active.
64 | if (rootFrame == nullptr)
65 | {
66 | // Create a Frame to act as the navigation context and associate it with
67 | // a SuspensionManager key
68 | rootFrame = ref new Frame();
69 |
70 | // TODO: Change this value to a cache size that is appropriate for your application.
71 | rootFrame->CacheSize = 1;
72 |
73 | if (e->PreviousExecutionState == ApplicationExecutionState::Terminated)
74 | {
75 | // TODO: Restore the saved session state only when appropriate, scheduling the
76 | // final launch steps after the restore is complete.
77 | }
78 |
79 | // Place the frame in the current Window
80 | Window::Current->Content = rootFrame;
81 | }
82 |
83 | if (rootFrame->Content == nullptr)
84 | {
85 | #if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP
86 | // Removes the turnstile navigation for startup.
87 | if (rootFrame->ContentTransitions != nullptr)
88 | {
89 | _transitions = ref new TransitionCollection();
90 | for (auto transition : rootFrame->ContentTransitions)
91 | {
92 | _transitions->Append(transition);
93 | }
94 | }
95 |
96 | rootFrame->ContentTransitions = nullptr;
97 | _firstNavigatedToken = rootFrame->Navigated += ref new NavigatedEventHandler(this, &App::RootFrame_FirstNavigated);
98 | #endif
99 |
100 | // When the navigation stack isn't restored navigate to the first page,
101 | // configuring the new page by passing required information as a navigation
102 | // parameter.
103 | if (!rootFrame->Navigate(MainPage::typeid, e->Arguments))
104 | {
105 | throw ref new FailureException("Failed to create initial page");
106 | }
107 | }
108 |
109 | // Ensure the current window is active
110 | Window::Current->Activate();
111 | }
112 |
113 | #if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP
114 | ///
115 | /// Restores the content transitions after the app has launched.
116 | ///
117 | void App::RootFrame_FirstNavigated(Object^ sender, NavigationEventArgs^ e)
118 | {
119 | auto rootFrame = safe_cast(sender);
120 |
121 | TransitionCollection^ newTransitions;
122 | if (_transitions == nullptr)
123 | {
124 | newTransitions = ref new TransitionCollection();
125 | newTransitions->Append(ref new NavigationThemeTransition());
126 | }
127 | else
128 | {
129 | newTransitions = _transitions;
130 | }
131 |
132 | rootFrame->ContentTransitions = newTransitions;
133 |
134 | rootFrame->Navigated -= _firstNavigatedToken;
135 | }
136 | #endif
137 |
138 | ///
139 | /// Invoked when application execution is being suspended. Application state is saved
140 | /// without knowing whether the application will be terminated or resumed with the contents
141 | /// of memory still intact.
142 | ///
143 | void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
144 | {
145 | (void) sender; // Unused parameter
146 | (void) e; // Unused parameter
147 |
148 | Trace(L"@%p Stopping", (void*)this);
149 | WPP_CLEANUP();
150 | }
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Shared/App.xaml.h:
--------------------------------------------------------------------------------
1 | //
2 | // App.xaml.h
3 | // Declaration of the App class.
4 | //
5 |
6 | #pragma once
7 |
8 | #include "App.g.h"
9 |
10 | namespace TraceWppTestApp
11 | {
12 | ///
13 | /// Provides application-specific behavior to supplement the default Application class.
14 | ///
15 | ref class App sealed
16 | {
17 | public:
18 | App();
19 |
20 | virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override;
21 |
22 | private:
23 | #if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP
24 | Windows::UI::Xaml::Media::Animation::TransitionCollection^ _transitions;
25 | Windows::Foundation::EventRegistrationToken _firstNavigatedToken;
26 |
27 | void RootFrame_FirstNavigated(Platform::Object^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs^ e);
28 | #endif
29 |
30 | void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Shared/TraceWppTestApp.Shared.vcxitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | b579886b-0d98-4c62-9833-ff9295c5c5c2
7 | {f6c2dbd8-cf4f-4174-89cb-953a48d24718}
8 | TraceWppTestApp
9 |
10 |
11 |
12 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)
13 |
14 |
15 |
16 |
17 | Designer
18 |
19 |
20 | $(MSBuildThisFileDirectory)App.xaml
21 |
22 |
23 | $(MSBuildThisFileDirectory)App.xaml
24 |
25 |
26 | Create
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Shared/TraceWppTestApp.Shared.vcxitems.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Shared/pch.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // pch.cpp
3 | // Include the standard header and generate the precompiled header.
4 | //
5 |
6 | #include "pch.h"
7 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Shared/pch.h:
--------------------------------------------------------------------------------
1 | //
2 | // pch.h
3 | // Header for standard system include files.
4 | //
5 |
6 | #pragma once
7 |
8 | #include
9 | #include
10 |
11 | // {B5DBB673-AB73-48A3-B004-B8902FA191C3}
12 | #define TraceWpp_Guid (B5DBB673,AB73,48A3,B004,B8902FA191C3)
13 |
14 | #define WPP_CONTROL_GUIDS \
15 | WPP_DEFINE_CONTROL_GUID(TraceWpp_CtrlGuid, TraceWpp_Guid, \
16 | WPP_DEFINE_BIT(TF_Default) \
17 | WPP_DEFINE_BIT(TF_EntryExit))
18 |
19 | #include "TraceWpp\TraceWpp.h"
20 |
21 | #include "App.xaml.h"
22 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/Assets/Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.Windows/Assets/Logo.scale-100.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/Assets/SmallLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.Windows/Assets/SmallLogo.scale-100.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.Windows/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.Windows/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/MainPage.xaml.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // MainPage.xaml.cpp
3 | // Implementation of the MainPage class.
4 | //
5 |
6 | #include "pch.h"
7 | #include "MainPage.xaml.h"
8 |
9 | using namespace TraceWppTestApp;
10 |
11 | using namespace Platform;
12 | using namespace Windows::Foundation;
13 | using namespace Windows::Foundation::Collections;
14 | using namespace Windows::UI::Xaml;
15 | using namespace Windows::UI::Xaml::Controls;
16 | using namespace Windows::UI::Xaml::Controls::Primitives;
17 | using namespace Windows::UI::Xaml::Data;
18 | using namespace Windows::UI::Xaml::Input;
19 | using namespace Windows::UI::Xaml::Media;
20 | using namespace Windows::UI::Xaml::Navigation;
21 |
22 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
23 |
24 | MainPage::MainPage()
25 | {
26 | InitializeComponent();
27 | }
28 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/MainPage.xaml.h:
--------------------------------------------------------------------------------
1 | //
2 | // MainPage.xaml.h
3 | // Declaration of the MainPage class.
4 | //
5 |
6 | #pragma once
7 |
8 | #include "MainPage.g.h"
9 |
10 | namespace TraceWppTestApp
11 | {
12 | ///
13 | /// An empty page that can be used on its own or navigated to within a Frame.
14 | ///
15 | public ref class MainPage sealed
16 | {
17 | public:
18 | MainPage();
19 |
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 | TraceWppTestApp.Windows
10 | Matthieu
11 | Assets\StoreLogo.png
12 |
13 |
14 |
15 | 6.3.0
16 | 6.3.0
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/TraceWppTestApp.Windows.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | ARM
7 |
8 |
9 | Debug
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | ARM
19 |
20 |
21 | Release
22 | Win32
23 |
24 |
25 | Release
26 | x64
27 |
28 |
29 |
30 | {538e47af-b2ac-4f46-8394-22d72d6b0771}
31 | TraceWppTestApp
32 | en-US
33 | 12.0
34 | true
35 | Windows Store
36 | 8.1
37 |
38 |
39 |
40 | Application
41 | true
42 | v120
43 |
44 |
45 | Application
46 | true
47 | v120
48 |
49 |
50 | Application
51 | true
52 | v120
53 |
54 |
55 | Application
56 | false
57 | true
58 | v120
59 |
60 |
61 | Application
62 | false
63 | true
64 | v120
65 |
66 |
67 | Application
68 | false
69 | true
70 | v120
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | TraceWppTestApp.Windows_TemporaryKey.pfx
97 | b03f661f
98 | True
99 | x86
100 |
101 |
102 |
103 | /bigobj %(AdditionalOptions)
104 | 4453;28204
105 |
106 |
107 | kernel32.lib;%(AdditionalDependencies);Advapi32.lib
108 |
109 |
110 |
111 |
112 | /bigobj %(AdditionalOptions)
113 | 4453;28204
114 |
115 |
116 | kernel32.lib;%(AdditionalDependencies);Advapi32.lib
117 |
118 |
119 |
120 |
121 | /bigobj %(AdditionalOptions)
122 | 4453;28204
123 | ProgramDatabase
124 |
125 |
126 | kernel32.lib;%(AdditionalDependencies);Advapi32.lib
127 |
128 |
129 |
130 |
131 | /bigobj %(AdditionalOptions)
132 | 4453;28204
133 |
134 |
135 | kernel32.lib;%(AdditionalDependencies);Advapi32.lib
136 |
137 |
138 |
139 |
140 | /bigobj %(AdditionalOptions)
141 | 4453;28204
142 |
143 |
144 | kernel32.lib;%(AdditionalDependencies);Advapi32.lib
145 |
146 |
147 |
148 |
149 | /bigobj %(AdditionalOptions)
150 | 4453;28204
151 |
152 |
153 | kernel32.lib;%(AdditionalDependencies);Advapi32.lib
154 |
155 |
156 |
157 |
158 | MainPage.xaml
159 |
160 |
161 |
162 |
163 |
164 | Designer
165 |
166 |
167 |
168 |
169 | Designer
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 | MainPage.xaml
183 |
184 |
185 |
186 |
187 | {3d42a426-318b-4c7d-91a3-10cf0df7482d}
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
197 |
198 |
199 |
200 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/TraceWppTestApp.Windows.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {1f63d605-03d0-44d8-8dc0-4b6b886ec210}
6 | bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png
7 |
8 |
9 | {07b3708d-eeed-472f-bd7f-50add46bba64}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | TraceWpp
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | Assets
34 |
35 |
36 | Assets
37 |
38 |
39 | Assets
40 |
41 |
42 | Assets
43 |
44 |
45 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/TraceWppTestApp.Windows_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.Windows/TraceWppTestApp.Windows_TemporaryKey.pfx
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.Windows/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/Logo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/Logo.scale-240.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/SmallLogo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/SmallLogo.scale-240.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/SplashScreen.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/SplashScreen.scale-240.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/Square71x71Logo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/Square71x71Logo.scale-240.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/StoreLogo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/StoreLogo.scale-240.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/WideLogo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmaitre314/TraceWpp/e50a9e1f84c9d4d712a9da30c81307004872fb20/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Assets/WideLogo.scale-240.png
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/MainPage.xaml.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // MainPage.xaml.cpp
3 | // Implementation of the MainPage class.
4 | //
5 |
6 | #include "pch.h"
7 | #include "MainPage.xaml.h"
8 |
9 | using namespace TraceWppTestApp;
10 |
11 | using namespace Platform;
12 | using namespace Windows::Foundation;
13 | using namespace Windows::Foundation::Collections;
14 | using namespace Windows::UI::Xaml;
15 | using namespace Windows::UI::Xaml::Controls;
16 | using namespace Windows::UI::Xaml::Controls::Primitives;
17 | using namespace Windows::UI::Xaml::Data;
18 | using namespace Windows::UI::Xaml::Input;
19 | using namespace Windows::UI::Xaml::Media;
20 | using namespace Windows::UI::Xaml::Navigation;
21 |
22 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
23 |
24 | MainPage::MainPage()
25 | {
26 | InitializeComponent();
27 | }
28 |
29 | ///
30 | /// Invoked when this page is about to be displayed in a Frame.
31 | ///
32 | /// Event data that describes how this page was reached. The Parameter
33 | /// property is typically used to configure the page.
34 | void MainPage::OnNavigatedTo(NavigationEventArgs^ e)
35 | {
36 | (void) e; // Unused parameter
37 |
38 | // TODO: Prepare page for display here.
39 |
40 | // TODO: If your application contains multiple pages, ensure that you are
41 | // handling the hardware Back button by registering for the
42 | // Windows::Phone::UI::Input::HardwareButtons.BackPressed event.
43 | // If you are using the NavigationHelper provided by some templates,
44 | // this event is handled for you.
45 | }
46 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/MainPage.xaml.h:
--------------------------------------------------------------------------------
1 | //
2 | // MainPage.xaml.h
3 | // Declaration of the MainPage class.
4 | //
5 |
6 | #pragma once
7 |
8 | #include "MainPage.g.h"
9 |
10 | namespace TraceWppTestApp
11 | {
12 | ///
13 | /// An empty page that can be used on its own or navigated to within a Frame.
14 | ///
15 | public ref class MainPage sealed
16 | {
17 | public:
18 | MainPage();
19 |
20 | protected:
21 | virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 | TraceWppTestApp.WindowsPhone
12 | Matthieu
13 | Assets\StoreLogo.png
14 |
15 |
16 |
17 | 6.3.1
18 | 6.3.1
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/TraceWppTestApp.WindowsPhone.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | ARM
7 |
8 |
9 | Debug
10 | Win32
11 |
12 |
13 | Release
14 | ARM
15 |
16 |
17 | Release
18 | Win32
19 |
20 |
21 |
22 | {a2cd24b8-efce-4662-b43a-408d833debd6}
23 | TraceWppTestApp
24 | en-US
25 | 12.0
26 | true
27 | Windows Phone
28 | 8.1
29 |
30 |
31 |
32 | Application
33 | true
34 | v120_wp81
35 |
36 |
37 | Application
38 | true
39 | v120_wp81
40 |
41 |
42 | Application
43 | false
44 | true
45 | v120_wp81
46 |
47 |
48 | Application
49 | false
50 | true
51 | v120_wp81
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | c805ec0b
71 | True
72 | arm
73 |
74 |
75 |
76 | /bigobj %(AdditionalOptions)
77 | 4453;28204
78 |
79 |
80 |
81 |
82 | /bigobj %(AdditionalOptions)
83 | 4453;28204
84 |
85 |
86 |
87 |
88 | /bigobj %(AdditionalOptions)
89 | 4453;28204
90 | ProgramDatabase
91 |
92 |
93 |
94 |
95 | /bigobj %(AdditionalOptions)
96 | 4453;28204
97 |
98 |
99 |
100 |
101 | MainPage.xaml
102 |
103 |
104 |
105 |
106 |
107 | Designer
108 |
109 |
110 |
111 |
112 | Designer
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | MainPage.xaml
126 |
127 |
128 |
129 |
130 | {1c61afdd-ab03-4280-b6af-12347cbc6aef}
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/TraceWppTestApp.WindowsPhone.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {e59d3e6c-7421-4c8f-94a2-399061548894}
6 | bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png
7 |
8 |
9 | Assets
10 |
11 |
12 | Assets
13 |
14 |
15 | Assets
16 |
17 |
18 | Assets
19 |
20 |
21 | Assets
22 |
23 |
24 | Assets
25 |
26 |
27 | {c55c4781-56f4-483f-97ea-f56900328b80}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | TraceWpp
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/TraceWppTestApp/TraceWppTestApp.WindowsPhone/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Shared/Class1.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 | #include "Class1.h"
3 |
4 | #include "TraceWpp\Class1.cpp.tmh"
5 |
6 | using namespace TraceWppTestDll;
7 | using namespace Platform;
8 |
9 | Class1::Class1()
10 | {
11 | Trace(L"@%p", (void*)this);
12 | }
13 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Shared/Class1.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace TraceWppTestDll
4 | {
5 | public ref class Class1 sealed
6 | {
7 | public:
8 | Class1();
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Shared/TraceWppTestDll.Shared.vcxitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | {b33b1b63-9d7a-4070-b073-94ddf14b8c47}
7 | TraceWppTestDll
8 | TraceWppTestDll.Shared
9 | 248F659F-DAC5-46E8-AC09-60EC9FC95053
10 |
11 |
12 |
13 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Create
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Shared/TraceWppTestDll.Shared.vcxitems.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Create
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Shared/module.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 | #include "TraceWpp\module.cpp.tmh"
3 |
4 | BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID lpvReserved)
5 | {
6 | switch (reason)
7 | {
8 | case DLL_PROCESS_ATTACH:
9 | DisableThreadLibraryCalls(instance);
10 | WPP_INIT_TRACING(L"TraceWppTestDll");
11 | Trace(L"@ DLL_PROCESS_ATTACH");
12 | break;
13 |
14 | case DLL_PROCESS_DETACH:
15 | Trace(L"@ DLL_PROCESS_DETACH");
16 | WPP_CLEANUP();
17 | break;
18 | }
19 |
20 | return TRUE;
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Shared/pch.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Shared/pch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | // {B5DBB673-AB73-48A3-B004-B8902FA191C3}
7 | #define TraceWpp_Guid (B5DBB673,AB73,48A3,B004,B8902FA191C3)
8 |
9 | #define WPP_CONTROL_GUIDS \
10 | WPP_DEFINE_CONTROL_GUID(TraceWpp_CtrlGuid, TraceWpp_Guid, \
11 | WPP_DEFINE_BIT(TF_Default) \
12 | WPP_DEFINE_BIT(TF_EntryExit))
13 |
14 | #include "TraceWpp\TraceWpp.h"
15 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Windows/TraceWppTestDll.Windows.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | ARM
7 |
8 |
9 | Debug
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | ARM
19 |
20 |
21 | Release
22 | Win32
23 |
24 |
25 | Release
26 | x64
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | {3d42a426-318b-4c7d-91a3-10cf0df7482d}
37 | TraceWppTestDll
38 | en-US
39 | 12.0
40 | true
41 | Windows Store
42 | 8.1
43 | CodeSharingWindowsRuntimeComponent
44 |
45 |
46 |
47 | DynamicLibrary
48 | true
49 | v120
50 |
51 |
52 | DynamicLibrary
53 | true
54 | v120
55 |
56 |
57 | DynamicLibrary
58 | true
59 | v120
60 |
61 |
62 | DynamicLibrary
63 | false
64 | true
65 | v120
66 |
67 |
68 | DynamicLibrary
69 | false
70 | true
71 | v120
72 |
73 |
74 | DynamicLibrary
75 | false
76 | true
77 | v120
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | 0eb340e2
101 |
102 |
103 | false
104 |
105 |
106 | false
107 |
108 |
109 | false
110 |
111 |
112 | false
113 |
114 |
115 | false
116 |
117 |
118 | false
119 |
120 |
121 |
122 | Use
123 | _WINRT_DLL;%(PreprocessorDefinitions)
124 | pch.h
125 | $(IntDir)pch.pch
126 | $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)
127 | /bigobj %(AdditionalOptions)
128 | 28204
129 | ProgramDatabase
130 |
131 |
132 | Console
133 | runtimeobject.lib;%(AdditionalDependencies);Advapi32.lib
134 | false
135 |
136 |
137 |
138 |
139 | Use
140 | _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)
141 | pch.h
142 | $(IntDir)pch.pch
143 | $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)
144 | /bigobj %(AdditionalOptions)
145 | 28204
146 |
147 |
148 | Console
149 | runtimeobject.lib;%(AdditionalDependencies);Advapi32.lib
150 | false
151 |
152 |
153 |
154 |
155 | Use
156 | _WINRT_DLL;%(PreprocessorDefinitions)
157 | pch.h
158 | $(IntDir)pch.pch
159 | $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)
160 | /bigobj %(AdditionalOptions)
161 | 28204
162 |
163 |
164 | Console
165 | runtimeobject.lib;%(AdditionalDependencies);Advapi32.lib
166 | false
167 |
168 |
169 |
170 |
171 | Use
172 | _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)
173 | pch.h
174 | $(IntDir)pch.pch
175 | $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)
176 | /bigobj %(AdditionalOptions)
177 | 28204
178 |
179 |
180 | Console
181 | runtimeobject.lib;%(AdditionalDependencies);Advapi32.lib
182 | false
183 |
184 |
185 |
186 |
187 | Use
188 | _WINRT_DLL;%(PreprocessorDefinitions)
189 | pch.h
190 | $(IntDir)pch.pch
191 | $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)
192 | /bigobj %(AdditionalOptions)
193 | 28204
194 |
195 |
196 | Console
197 | runtimeobject.lib;%(AdditionalDependencies);Advapi32.lib
198 | false
199 |
200 |
201 |
202 |
203 | Use
204 | _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)
205 | pch.h
206 | $(IntDir)pch.pch
207 | $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)
208 | /bigobj %(AdditionalOptions)
209 | 28204
210 |
211 |
212 | Console
213 | runtimeobject.lib;%(AdditionalDependencies);Advapi32.lib
214 | false
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
224 |
225 |
226 |
227 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Windows/TraceWppTestDll.Windows.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7ca332ad-bfb4-4236-b7cc-8213b57fac92}
6 |
7 |
8 |
9 |
10 | TraceWpp
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.Windows/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.WindowsPhone/TraceWppTestDll.WindowsPhone.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | ARM
7 |
8 |
9 | Debug
10 | Win32
11 |
12 |
13 | Release
14 | ARM
15 |
16 |
17 | Release
18 | Win32
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | {1c61afdd-ab03-4280-b6af-12347cbc6aef}
29 | TraceWppTestDll
30 | en-US
31 | 12.0
32 | true
33 | Windows Phone
34 | 8.1
35 | CodeSharingWindowsRuntimeComponent
36 | 8f31a875
37 |
38 |
39 |
40 | DynamicLibrary
41 | true
42 | v120_wp81
43 |
44 |
45 | DynamicLibrary
46 | true
47 | v120_wp81
48 |
49 |
50 | DynamicLibrary
51 | false
52 | true
53 | v120_wp81
54 |
55 |
56 | DynamicLibrary
57 | false
58 | true
59 | v120_wp81
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | Use
86 | _WINRT_DLL;%(PreprocessorDefinitions)
87 | pch.h
88 | $(IntDir)pch.pch
89 | /bigobj %(AdditionalOptions)
90 | true
91 | ProgramDatabase
92 |
93 |
94 | Console
95 | false
96 |
97 |
98 |
99 |
100 | Use
101 | _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)
102 | pch.h
103 | $(IntDir)pch.pch
104 | /bigobj %(AdditionalOptions)
105 | true
106 |
107 |
108 | Console
109 | false
110 |
111 |
112 |
113 |
114 | Use
115 | _WINRT_DLL;%(PreprocessorDefinitions)
116 | pch.h
117 | $(IntDir)pch.pch
118 | /bigobj %(AdditionalOptions)
119 | true
120 |
121 |
122 | Console
123 | false
124 |
125 |
126 |
127 |
128 | Use
129 | _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)
130 | pch.h
131 | $(IntDir)pch.pch
132 | /bigobj %(AdditionalOptions)
133 | true
134 |
135 |
136 | Console
137 | false
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
147 |
148 |
149 |
150 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.WindowsPhone/TraceWppTestDll.WindowsPhone.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {6015dc4f-d4ac-4ac7-8530-b9e874425b4b}
6 |
7 |
8 |
9 |
10 | TraceWpp
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/TraceWppTestDll/TraceWppTestDll.WindowsPhone/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------