1 /* ****************************************************************************** *\ 2 3 INTEL CORPORATION PROPRIETARY INFORMATION 4 This software is supplied under the terms of a license agreement or nondisclosure 5 agreement with Intel Corporation and may not be copied or disclosed except in 6 accordance with the terms of that agreement 7 Copyright(c) 2012-2020 Intel Corporation. All Rights Reserved. 8 9 File Name: MsdkAnalyzerCpp.cs 10 11 \* ****************************************************************************** */ 12 13 using System; 14 using System.Collections.Generic; 15 using System.Text; 16 using System.Runtime.InteropServices; 17 using System.Diagnostics.Eventing; 18 using Microsoft.Win32; 19 20 namespace msdk_analyzer 21 { 22 class MsdkAnalyzerCpp 23 { 24 #if DEBUG 25 #if WIN64 26 const string msdk_analyzer_path = "mfx-tracer_64_d.dll"; 27 #else 28 const string msdk_analyzer_path = "mfx-tracer_32_d.dll"; 29 #endif 30 #else 31 #if WIN64 32 const string msdk_analyzer_path = "mfx-tracer_64.dll"; 33 #else 34 const string msdk_analyzer_path = "mfx-tracer_32.dll"; 35 #endif 36 #endif 37 38 39 [DllImport(msdk_analyzer_path, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] convert_etl_to_text([MarshalAs(UnmanagedType.U4)] int hwnd , [MarshalAs(UnmanagedType.U4)] int hinst , [MarshalAs(UnmanagedType.LPStr)]string lpszCmdLine , int nCmdShow)40 public static extern void convert_etl_to_text 41 ([MarshalAs(UnmanagedType.U4)] int hwnd 42 , [MarshalAs(UnmanagedType.U4)] int hinst 43 , [MarshalAs(UnmanagedType.LPStr)]string lpszCmdLine 44 , int nCmdShow); 45 46 [DllImport(msdk_analyzer_path, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] install([MarshalAs(UnmanagedType.LPStr)] string folder_path, [MarshalAs(UnmanagedType.LPStr)] string app_data, [MarshalAs(UnmanagedType.LPStr)] string conf_path)47 public static extern UInt32 install([MarshalAs(UnmanagedType.LPStr)] string folder_path, 48 [MarshalAs(UnmanagedType.LPStr)] string app_data, 49 [MarshalAs(UnmanagedType.LPStr)] string conf_path);//default place for log file 50 51 [DllImport(msdk_analyzer_path, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] uninstall()52 public static extern UInt32 uninstall(); 53 54 [DllImport(msdk_analyzer_path, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] start()55 public static extern void start(); 56 57 [DllImport(msdk_analyzer_path, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] stop()58 public static extern void stop(); 59 60 61 } 62 63 64 } 65