From 96eb96dfb613e4c745db6bd1f53a92fe7e2290fc Mon Sep 17 00:00:00 2001 From: karlf Date: Thu, 11 Aug 2016 13:28:13 -0700 Subject: Updated for "Windows 10 Anniversary Update" (Version 1607) --- general/tracing/SystemTraceControl/ReadMe.txt | 36 ---- .../SystemTraceControl/SystemTraceControl.cpp | 6 +- .../SystemTraceControl/SystemTraceControl.sln | 22 +-- .../SystemTraceControl/SystemTraceControl.vcxproj | 181 +++++---------------- .../SystemTraceControl.vcxproj.Filters | 9 +- 5 files changed, 55 insertions(+), 199 deletions(-) delete mode 100644 general/tracing/SystemTraceControl/ReadMe.txt (limited to 'general/tracing/SystemTraceControl') diff --git a/general/tracing/SystemTraceControl/ReadMe.txt b/general/tracing/SystemTraceControl/ReadMe.txt deleted file mode 100644 index 54609bd7..00000000 --- a/general/tracing/SystemTraceControl/ReadMe.txt +++ /dev/null @@ -1,36 +0,0 @@ -EventTracing SystemTraceProvider control sample -==================================================================================== -This sample demonstrates how to use event tracing control API's to collect events -from system trace provider. The code provided will start an ETW system trace and -enable system events with stacks. After collecting the data for 30 seconds trace -will be stopped. Resulting file (systemtrace.etl) can be processed with -inbox tracerpt.exe, programmatically (OpenTrace/ProcessTrace/CloseTrace) or using -WPT (Windows Performance Toolkit) available in the SDK. - -Sample Language Implementations -=============================== -C++ - -Files -================================================= -SystemTraceProvider.sln -SystemTraceProvider.vcxproj -SystemTraceProvider.cpp -sources -ReadMe.txt - -To build the sample using the command prompt: -============================================= - 1. Open the Command Prompt window and navigate to the directory. - 2. Type msbuild SystemTraceControl.sln. - -To build the sample using Visual Studio (preferred method): -================================================ - 1. Open File Explorer and navigate to the SystemTraceControl directory. - 2. Double-click the icon for the .sln (solution) file to open the file in Visual Studio. - 3. In the Build menu, select Build Solution. The application will be built in the default \Debug or \Release directory. - -To run the sample: -================= - 1. Navigate to the directory that contains the new executable, using the command prompt or File Explorer. - 2. Type SystemTraceControl.exe at the command line, or double-click the icon for SystemTraceControl.exe to launch it from File Explorer. \ No newline at end of file diff --git a/general/tracing/SystemTraceControl/SystemTraceControl.cpp b/general/tracing/SystemTraceControl/SystemTraceControl.cpp index a8c55026..42647061 100644 --- a/general/tracing/SystemTraceControl/SystemTraceControl.cpp +++ b/general/tracing/SystemTraceControl/SystemTraceControl.cpp @@ -81,13 +81,13 @@ AllocateTraceProperties ( (MAXIMUM_SESSION_NAME * sizeof(WCHAR)); if (LoggerName != NULL) { - StringCchCopy((LPWSTR)((PCHAR)TraceProperties + TraceProperties->LoggerNameOffset), + StringCchCopyW((LPWSTR)((PCHAR)TraceProperties + TraceProperties->LoggerNameOffset), MAXIMUM_SESSION_NAME, LoggerName); } if (LogFileName != NULL) { - StringCchCopy((LPWSTR)((PCHAR)TraceProperties + TraceProperties->LogFileNameOffset), + StringCchCopyW((LPWSTR)((PCHAR)TraceProperties + TraceProperties->LogFileNameOffset), MAX_PATH, LogFileName); } @@ -146,7 +146,7 @@ wmain() // Start trace session which can receive events from SystemTraceProvider. // - Status = StartTrace(&SessionHandle, LoggerName, TraceProperties); + Status = StartTraceW(&SessionHandle, LoggerName, TraceProperties); if (Status != ERROR_SUCCESS) { wprintf(L"StartTrace() failed with %lu\n", Status); goto Exit; diff --git a/general/tracing/SystemTraceControl/SystemTraceControl.sln b/general/tracing/SystemTraceControl/SystemTraceControl.sln index 2afb4ba4..f90d4b3d 100644 --- a/general/tracing/SystemTraceControl/SystemTraceControl.sln +++ b/general/tracing/SystemTraceControl/SystemTraceControl.sln @@ -1,26 +1,18 @@  -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0 -MinimumVisualStudioVersion = 12.0 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SystemTraceControl", "SystemTraceControl.vcxproj", "{E4F6F3AB-051E-4B70-B942-2E5E17C12F6A}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SystemTraceControl", "SystemTraceControl.vcxproj", "{69BD6A4C-5051-E271-F174-E5E67BC09464}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E4F6F3AB-051E-4B70-B942-2E5E17C12F6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {E4F6F3AB-051E-4B70-B942-2E5E17C12F6A}.Debug|Win32.Build.0 = Debug|Win32 - {E4F6F3AB-051E-4B70-B942-2E5E17C12F6A}.Release|Win32.ActiveCfg = Release|Win32 - {E4F6F3AB-051E-4B70-B942-2E5E17C12F6A}.Release|Win32.Build.0 = Release|Win32 - {E4F6F3AB-051E-4B70-B942-2E5E17C12F6A}.Debug|x64.ActiveCfg = Debug|x64 - {E4F6F3AB-051E-4B70-B942-2E5E17C12F6A}.Debug|x64.Build.0 = Debug|x64 - {E4F6F3AB-051E-4B70-B942-2E5E17C12F6A}.Release|x64.ActiveCfg = Release|x64 - {E4F6F3AB-051E-4B70-B942-2E5E17C12F6A}.Release|x64.Build.0 = Release|x64 + {69BD6A4C-5051-E271-F174-E5E67BC09464}.Debug|Win32.ActiveCfg = Debug|Win32 + {69BD6A4C-5051-E271-F174-E5E67BC09464}.Debug|Win32.Build.0 = Debug|Win32 + {69BD6A4C-5051-E271-F174-E5E67BC09464}.Release|Win32.ActiveCfg = Release|Win32 + {69BD6A4C-5051-E271-F174-E5E67BC09464}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj b/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj index adc3b39e..6aeaa431 100644 --- a/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj +++ b/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -9,170 +9,67 @@ Release Win32 - - Debug - x64 - - - Release - x64 - - {E4F6F3AB-051E-4B70-B942-2E5E17C12F6A} - $(MSBuildProjectName) - Debug - Win32 - {6C3A654A-1721-4D65-9EEC-E6C8CBEA4716} + Win32Proj + {69BD6A4C-5051-E271-F174-E5E67BC09464} - - Windows10 - False - Desktop - - WindowsApplicationForDrivers10.0 - Application - - - Windows10 - True - Desktop - - WindowsApplicationForDrivers10.0 - Application - - - Windows10 - False - Desktop - - WindowsApplicationForDrivers10.0 + Application + true + v140 - - Windows10 - True - Desktop - - WindowsApplicationForDrivers10.0 + Application + false + v140 - - $(IntDir) - - - + - - + + - - - - + - - - SystemTraceControl - - - SystemTraceControl - - - SystemTraceControl - - - SystemTraceControl - - - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - true - Level4 - - - - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - - - + - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - true - Level4 - - + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Level3 + ProgramDatabase + Disabled - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - + + MachineX86 + true + Console + - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - true - Level4 - - - - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - - - - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - true - Level4 - - + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + Level3 + ProgramDatabase - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - - - %(PreprocessorDefinitions);UNICODE;_UNICODE - %(AdditionalIncludeDirectories);$(SDK_LIB_PATH) - + + MachineX86 + true + Console + true + true + - - - - - - - - - - + - \ No newline at end of file + + + diff --git a/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj.Filters b/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj.Filters index f6f26513..575b76ca 100644 --- a/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj.Filters +++ b/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj.Filters @@ -3,15 +3,15 @@ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;* - {3B6D39BB-727A-4200-BB47-9DBB3C2B1976} + {CA2B3951-E1B8-494F-93BB-603ACAB74855} h;hpp;hxx;hm;inl;inc;xsd - {684A7E16-CFF9-4768-84ED-6E58F714AD74} + {EA9117C8-07C0-4427-A610-83A12B10202F} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml - {706A7968-4A64-4FC5-B349-598AF05146FC} + {3DBF8590-C024-4409-9170-2CE16201AA6F} @@ -19,4 +19,7 @@ Source Files + + + \ No newline at end of file -- cgit v1.3.1