• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Eventing.EventDescriptor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Diagnostics.Eventing.EventDescriptor的典型用法代码示例。如果您正苦于以下问题:C# EventDescriptor类的具体用法?C# EventDescriptor怎么用?C# EventDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EventDescriptor类属于System.Diagnostics.Eventing命名空间,在下文中一共展示了EventDescriptor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: WriteEvent

        internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, Guid value1, string value2, string value3)
        {
            const int argumentCount = 3;
            bool status = true;

            //check all strings for null
            value2 = (value2 ?? string.Empty);
            value3 = (value3 ?? string.Empty);

            fixed (char* string1Bytes = value2, string2Bytes = value3)
            {
                byte* eventData = stackalloc byte[sizeof(UnsafeNativeMethods.EventData) * argumentCount];
                UnsafeNativeMethods.EventData* eventDataPtr = (UnsafeNativeMethods.EventData*)eventData;

                eventDataPtr[0].DataPointer = (ulong)(&value1);
                eventDataPtr[0].Size = (uint)(sizeof(Guid));

                eventDataPtr[1].DataPointer = (ulong)string1Bytes;
                eventDataPtr[1].Size = (uint)(value2.Length + 1) * sizeof(char);

                eventDataPtr[2].DataPointer = (ulong)string2Bytes;
                eventDataPtr[2].Size = (uint)(value3.Length + 1) * sizeof(char);

                status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(eventData));
            }

            return status;
        }
开发者ID:nuxleus,项目名称:WCFWeb,代码行数:28,代码来源:EtwProvider.cs


示例2: PowwaEvents

		static PowwaEvents()
		{
			PowwaEvents.m_provider = new EventProviderVersionTwo(new Guid("ead6595b-5613-414c-a5ee-069bb1eca485"));
			PowwaEvents.EVENT_AUTHENTICATION_FAILURE = new EventDescriptor(0x101, 0, 16, 4, 0, 1, -9223372036854775800L);
			PowwaEvents.EVENT_AUTHORIZATION_FAILURE = new EventDescriptor(0x102, 0, 16, 4, 0, 2, -9223372036854775792L);
			PowwaEvents.EVENT_GATEWAY_AUTHORIZATION_FAILURE = new EventDescriptor(0x103, 0, 16, 4, 0, 2, -9223372036854775792L);
			PowwaEvents.EVENT_SESSION_LIMIT_REACHED = new EventDescriptor(0x104, 0, 16, 4, 0, 12, -9223372036854775792L);
			PowwaEvents.EVENT_LOGON_FAILURE = new EventDescriptor(0x105, 0, 16, 4, 0, 13, -9223372036854775800L);
			PowwaEvents.EVENT_AUTHORIZATION_FAILURE_INVALID_RULES = new EventDescriptor(0x10b, 0, 16, 3, 0, 2, -9223372036854775792L);
			PowwaEvents.EVENT_PSRCONNECTION_FAILURE = new EventDescriptor(0x201, 0, 16, 4, 0, 13, -9223372036854775806L);
			PowwaEvents.EVENT_PSREXECUTION_FAILURE = new EventDescriptor(0x202, 0, 16, 4, 0, 5, -9223372036854775806L);
			PowwaEvents.EVENT_SESSION_START = new EventDescriptor(0x301, 0, 16, 4, 1, 3, -9223372036854775806L);
			PowwaEvents.EVENT_SESSION_END = new EventDescriptor(0x302, 0, 16, 4, 2, 3, -9223372036854775806L);
			PowwaEvents.EVENT_TERMINATE_SESSION_ERROR = new EventDescriptor(0x307, 0, 16, 2, 0, 3, -9223372036854775806L);
			PowwaEvents.EVENT_GENERIC_FAILURE = new EventDescriptor(0x401, 0, 16, 4, 0, 6, -9223372036854775808L);
			PowwaEvents.EVENT_ACTIVITYID_TRANSFER = new EventDescriptor(0x402, 0, 16, 4, 0, 7, -9223372036854775808L);
			PowwaEvents.EVENT_INVALID_APPLICATION_SETTING = new EventDescriptor(0x501, 0, 16, 2, 0, 14, -9223372036854775808L);
			PowwaEvents.EVENT_INVALID_SESSION_KEY = new EventDescriptor(0x601, 0, 16, 2, 0, 3, -9223372036854775807L);
			PowwaEvents.EVENT_INVALID_SESSION_USER = new EventDescriptor(0x602, 0, 16, 2, 0, 3, -9223372036854775807L);
			PowwaEvents.EVENT_MALICIOUS_DATA = new EventDescriptor(0x603, 0, 16, 2, 0, 3, -9223372036854775807L);
			PowwaEvents.EVENT_AUTHENTICATION_START = new EventDescriptor(0x106, 0, 18, 4, 1, 1, 0x2000000000000008L);
			PowwaEvents.EVENT_AUTHENTICATION_STOP = new EventDescriptor(0x107, 0, 18, 4, 2, 1, 0x2000000000000008L);
			PowwaEvents.EVENT_GATEWAY_AUTHORIZATION_START = new EventDescriptor(0x108, 0, 18, 4, 1, 2, 0x2000000000000010L);
			PowwaEvents.EVENT_GATEWAY_AUTHORIZATION_STOP = new EventDescriptor(0x109, 0, 18, 4, 2, 2, 0x2000000000000010L);
			PowwaEvents.EVENT_SESSION_LIMIT_CHECK = new EventDescriptor(0x10a, 0, 18, 4, 0, 12, 0x2000000000000008L);
			PowwaEvents.EVENT_DEBUG_CONNECT_USING_COMPUTERNAME = new EventDescriptor(0x303, 0, 17, 4, 0, 3, 0x4000000000000002L);
			PowwaEvents.EVENT_DEBUG_CONNECT_USING_URI = new EventDescriptor(0x304, 0, 17, 4, 0, 3, 0x4000000000000002L);
			PowwaEvents.EVENT_DEBUG_LOG0 = new EventDescriptor(0x403, 0, 17, 4, 0, 8, 0x4000000000000000L);
			PowwaEvents.EVENT_DEBUG_LOG1 = new EventDescriptor(0x404, 0, 17, 4, 0, 8, 0x4000000000000000L);
			PowwaEvents.EVENT_DEBUG_LOG2 = new EventDescriptor(0x405, 0, 17, 4, 0, 8, 0x4000000000000000L);
		}
开发者ID:nickchal,项目名称:pash,代码行数:31,代码来源:PowwaEvents.cs


示例3: ProviderJyTrace

 static ProviderJyTrace()
 {
     unchecked
     {
         FunctionEntry = new EventDescriptor(0x65, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x1);
         FunctionExit = new EventDescriptor(0x66, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x1);
         InfoW = new EventDescriptor(0x67, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         ErrorW = new EventDescriptor(0x68, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         InfoA = new EventDescriptor(0x69, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         ErrorA = new EventDescriptor(0x6a, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         WideStrInfo = new EventDescriptor(0x6b, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         WideStrError = new EventDescriptor(0x6c, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         AnsiStrInfo = new EventDescriptor(0x6d, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         AnsiStrError = new EventDescriptor(0x6e, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         HresultError = new EventDescriptor(0x6f, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         LastError = new EventDescriptor(0x70, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         PointerInfo = new EventDescriptor(0x71, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         PointerError = new EventDescriptor(0x72, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         NumberInfo = new EventDescriptor(0x73, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         NumberError = new EventDescriptor(0x74, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         HexInfo = new EventDescriptor(0x75, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         HexError = new EventDescriptor(0x76, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         BoolInfo = new EventDescriptor(0x77, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         BoolError = new EventDescriptor(0x78, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         GuidInfo = new EventDescriptor(0x79, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         GuidError = new EventDescriptor(0x7a, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         FloatInfo = new EventDescriptor(0x7b, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
         FloatError = new EventDescriptor(0x7c, 0x0, 0x0, 0x2, 0x0, 0x0, (long)0x2);
         Simple = new EventDescriptor(0x7d, 0x0, 0x0, 0x5, 0x0, 0x0, (long)0x2);
     }
 }
开发者ID:flowerinthenight,项目名称:win32-etw-manifest,代码行数:31,代码来源:JyTrace.cs


示例4: WriteEventHelper

 private void WriteEventHelper(int eventId)
 {
     if (this.provider != null)
     {
         EventDescriptor descriptor = new EventDescriptor(eventId, 0, 0, 0, 0, 0, 0);
         this.provider.WriteEvent(ref descriptor);
     }
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:8,代码来源:VSDesignerPerfEventProvider.cs


示例5: TEST_SUITE_EVENTS

 public TEST_SUITE_EVENTS()
 {
     unchecked
     {
         TestSuiteLog = new EventDescriptor(0x1, 0x0, 0x9, 0x4, 0x0, 0x0, (long)0x8000000000000000);
         RawMessage = new EventDescriptor(0x2, 0x0, 0x9, 0x4, 0x0, 0x0, (long)0x8000000000000000);
     }
 }
开发者ID:JessieF,项目名称:ProtocolTestFramework,代码行数:8,代码来源:TestSuiteProvider.cs


示例6: EnsureEventDescriptors

 private static void EnsureEventDescriptors()
 {
     if (object.ReferenceEquals(TD.eventDescriptors, null))
     {
         EventDescriptor[] eventDescriptors = new EventDescriptor[] { new EventDescriptor(0x1069, 0, 0x13, 5, 0, 0, 0x1000000000000000L), new EventDescriptor(0x106a, 0, 0x13, 5, 0, 0, 0x1000000000000000L), new EventDescriptor(0x106b, 0, 0x13, 2, 0, 0, 0x1000000000000000L), new EventDescriptor(0x106d, 0, 0x13, 2, 0, 0, 0x1000000000000000L), new EventDescriptor(0x106e, 0, 0x13, 2, 0, 0, 0x1000000000000000L), new EventDescriptor(0x106f, 0, 0x13, 4, 0, 0, 0x1000000000000000L), new EventDescriptor(0x1070, 0, 0x13, 4, 0, 0, 0x1000000000000000L), new EventDescriptor(0x1071, 0, 0x13, 2, 0, 0, 0x1000000000000000L), new EventDescriptor(0x1072, 0, 0x13, 3, 0, 0, 0x1000000000000000L), new EventDescriptor(0x1074, 0, 0x13, 3, 0, 0, 0x1000000000000000L), new EventDescriptor(0x1073, 0, 0x13, 3, 0, 0, 0x1000000000000000L), new EventDescriptor(0x1075, 0, 0x13, 2, 0, 0, 0x1000000000000000L), new EventDescriptor(0x1076, 0, 0x13, 2, 0, 0, 0x1000000000000000L) };
         FxTrace.UpdateEventDefinitions(eventDescriptors);
         TD.eventDescriptors = eventDescriptors;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:TD.cs


示例7: EtwEventCorrelator

 public EtwEventCorrelator(EventProvider transferProvider, EventDescriptor transferEvent)
 {
     if (transferProvider == null)
     {
         throw new ArgumentNullException("transferProvider");
     }
     this._transferProvider = transferProvider;
     this._transferEvent = transferEvent;
 }
开发者ID:nickchal,项目名称:pash,代码行数:9,代码来源:EtwEventCorrelator.cs


示例8: MicrosoftWindowsSDKSampleSimpleProviderCs

 public MicrosoftWindowsSDKSampleSimpleProviderCs()
 {
     unchecked
     {
         SampleEvt_INT32 = new EventDescriptor(0x65, 0x0, 0x9, 0x4, 0x0, 0x0, (long)0x8000000000000000);
         SampleEvt_Float = new EventDescriptor(0x66, 0x0, 0x10, 0x3, 0x0, 0x0, (long)0x4000000000000000);
         SampleEvt_Bool = new EventDescriptor(0x67, 0x0, 0x10, 0x2, 0x0, 0x0, (long)0x4000000000000000);
         SampleEvt_UnicodeString = new EventDescriptor(0x68, 0x0, 0x9, 0x1, 0x0, 0x0, (long)0x8000000000000000);
         SampleEvt_Guid = new EventDescriptor(0x69, 0x0, 0x9, 0x1, 0x0, 0x0, (long)0x8000000000000000);
     }
 }
开发者ID:dbremner,项目名称:Windows-classic-samples,代码行数:11,代码来源:SimpleProviderEvents.cs


示例9: LogToEtw

 private void LogToEtw(TraceEventType eventType, int id, string eventMessage)
 {
     EtwEventLevel level = this.ConvertTraceEventTypeToEventLevel(eventType);
     EventDescriptor eventDescriptor = new EventDescriptor(0xf01c, 0, 0, (byte)level, 0, 0, 0L); // From DiagnosticMonitorTraceListener
     try
     {
         this.m_eventProvider.WriteEvent(ref eventDescriptor, new object[] { (ulong)id, eventMessage });
     }
     catch (ArgumentException)
     {
     }
     catch (System.ComponentModel.Win32Exception)
     {
     }
 }
开发者ID:Frank-Tao,项目名称:durabletask,代码行数:15,代码来源:OrchestrationEtwListener.cs


示例10: Trace

 private bool Trace(PowerShellTraceEvent traceEvent, PowerShellTraceLevel level, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args)
 {
     EventDescriptor eventDescriptor = new EventDescriptor((int) traceEvent, 1, (byte) this._traceChannel, (byte) level, (byte) operationCode, (int) task, (long) this._keywords);
     if (args != null)
     {
         for (int i = 0; i < args.Length; i++)
         {
             if (args[i] == null)
             {
                 args[i] = string.Empty;
             }
         }
     }
     return _provider.WriteEvent(ref eventDescriptor, args);
 }
开发者ID:nickchal,项目名称:pash,代码行数:15,代码来源:PowerShellChannelWriter.cs


示例11: CalculatorServiceEventProvider

        public CalculatorServiceEventProvider()
        {
            Guid providerId;
            if (HostingEnvironment.IsHosted) {
                DiagnosticSection config = (DiagnosticSection)WebConfigurationManager.GetSection(DiagnosticsConfigSectionName);
                providerId = new Guid(config.EtwProviderId);
                hostReferenceIsComplete = false;
            } else {
                DiagnosticSection config = (DiagnosticSection)ConfigurationManager.GetSection(DiagnosticsConfigSectionName);
                providerId = new Guid(config.EtwProviderId);
                hostReference = string.Empty;
                hostReferenceIsComplete = true;
            }

            innerEventProvider = new EventProvider(providerId);

            errorDescriptor = new EventDescriptor(ErrorEventId, Version, Channel, ErrorLevel, Opcode, Task, Keywords);
            warningDescriptor = new EventDescriptor(WarningEventId, Version, Channel, WarningLevel, Opcode, Task, Keywords);
            infoDescriptor = new EventDescriptor(InfoEventId, Version, Channel, InfoLevel, Opcode, Task, Keywords);
        }
开发者ID:0811112150,项目名称:HappyDayHistory,代码行数:20,代码来源:CalculatorService.svc.EventProvider.cs


示例12: TemplateT_POINTER

        internal unsafe bool TemplateT_POINTER(
            ref EventDescriptor eventDescriptor,
            IntPtr Prop_Pointer
            )
        {
            int argumentCount = 1;
            bool status = true;

            if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
            {
                byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
                EventData* userDataPtr = (EventData*)userData;

                userDataPtr[0].DataPointer = (UInt64)(&Prop_Pointer);
                userDataPtr[0].Size = (uint)(sizeof(IntPtr)  );

                status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
            }

            return status;
        }
开发者ID:dbremner,项目名称:Windows-classic-samples,代码行数:21,代码来源:AdvancedProviderEvents.cs


示例13: WriteImpl

 private void WriteImpl(TraceSeverity level, Payload payload)
 {
     EventDescriptor descriptor = new EventDescriptor(0, 0, 0, (byte)level, 0, 0, 0);
     using (EVENT_DATA_DESCRIPTOR data = new EVENT_DATA_DESCRIPTOR(payload))
     using (DataDescriptorWrapper wrapper = new DataDescriptorWrapper(data))
     {
         bool fResult = WriteEvent(ref descriptor, 1, wrapper.Ptr);
         if (!fResult)
             Console.WriteLine("Failed to call WriteEvent for real payload {0}", Marshal.GetLastWin32Error());
     }
 }
开发者ID:powareverb,项目名称:SPExpressionBuilder,代码行数:11,代码来源:SPTraceLogger.cs


示例14: MicrosoftWindowsSDKSampleAdvancedProviderCs

 public MicrosoftWindowsSDKSampleAdvancedProviderCs()
 {
     unchecked
     {
         SampleEvt_INT8 = new EventDescriptor(0x66, 0x0, 0x8, 0x1, 0x1, 0x64, (long)0x8000000000000000);
         SampleEvt_UINT8 = new EventDescriptor(0x67, 0x0, 0x8, 0x1, 0x2, 0x64, (long)0x8040000000000000);
         SampleEvt_UINT8_HEXINT8 = new EventDescriptor(0x68, 0x0, 0x8, 0x1, 0x0, 0x64, (long)0x8000000000000000);
         SampleEvt_INT16 = new EventDescriptor(0x69, 0x0, 0x8, 0x1, 0x7, 0x64, (long)0x8000000000000000);
         SampleEvt_UINT16 = new EventDescriptor(0x6a, 0x0, 0x8, 0x1, 0x8, 0x64, (long)0x8000000000000000);
         SampleEvt_UINT16_HexInt16 = new EventDescriptor(0x6b, 0x0, 0x8, 0x1, 0x9, 0x64, (long)0x8000000000000000);
         SampleEvt_INT32 = new EventDescriptor(0x6c, 0x0, 0x8, 0x1, 0xf0, 0x64, (long)0x8000000000000000);
         SampleEvt_UINT32 = new EventDescriptor(0x6d, 0x0, 0x8, 0x1, 0xa, 0x64, (long)0x8000000000000000);
         SampleEvt_UINT32_PID = new EventDescriptor(0x6e, 0x0, 0x8, 0x1, 0xb, 0x64, (long)0x8000000000000000);
         SampleEvt_UINT32_TID = new EventDescriptor(0x6f, 0x0, 0x8, 0x1, 0x1, 0x65, (long)0x8000000000000000);
         SampleEvt_UINT32_IPV4 = new EventDescriptor(0x70, 0x0, 0x8, 0x1, 0x2, 0x65, (long)0x8000000000000000);
         SampleEvt_UINT32_ERRORCODE = new EventDescriptor(0x72, 0x0, 0x8, 0x1, 0x0, 0x65, (long)0x8000000000000000);
         SampleEvt_UINT32_HEXINT32 = new EventDescriptor(0x73, 0x0, 0x8, 0x1, 0x7, 0x65, (long)0x8000000000000000);
         SampleEvt_INT64 = new EventDescriptor(0x74, 0x0, 0x8, 0x1, 0x8, 0x65, (long)0x8000000000000000);
         SampleEvt_UINT64 = new EventDescriptor(0x75, 0x0, 0x8, 0x1, 0x9, 0x65, (long)0x8000000000000000);
         SampleEvt_UINT64_HEXInt64 = new EventDescriptor(0x76, 0x0, 0x8, 0x1, 0xf0, 0x65, (long)0x8000000000000000);
         SampleEvt_FLOAT = new EventDescriptor(0x77, 0x0, 0x8, 0x1, 0xa, 0x65, (long)0x8000000000000000);
         SampleEvt_DOUBLE = new EventDescriptor(0x78, 0x0, 0x8, 0x1, 0xb, 0x65, (long)0x8000000000000000);
         SampleEvt_BOOL = new EventDescriptor(0x79, 0x0, 0x8, 0x1, 0x1, 0x66, (long)0x8000000000000000);
         SampleEvt_GUID = new EventDescriptor(0x7d, 0x0, 0x8, 0x1, 0x2, 0x66, (long)0x8000000000000000);
         SampleEvt_POINTER = new EventDescriptor(0x7e, 0x0, 0x8, 0x1, 0x0, 0x66, (long)0x8000000000000000);
         SampleEvt_FILETIME = new EventDescriptor(0x7f, 0x0, 0x8, 0x1, 0x7, 0x66, (long)0x8000000000000000);
         SampleEvt_SID = new EventDescriptor(0x80, 0x0, 0x8, 0x1, 0x9, 0x66, (long)0x8000000000000000);
         SampleEvt_UnicodeString = new EventDescriptor(0xc8, 0x0, 0x9, 0x4, 0xf0, 0x66, (long)0x4000000000000000);
         SampleEvt_FixedLength_UnicodeString = new EventDescriptor(0xc9, 0x0, 0x9, 0x4, 0xb, 0x66, (long)0x4000000000000000);
         SampleEvt_ParamLength_UnicodeString = new EventDescriptor(0xca, 0x0, 0x9, 0x4, 0x0, 0x67, (long)0x4000000000000000);
         SampleEvt_UserChannel_UnicodeString = new EventDescriptor(0x258, 0x0, 0x11, 0x2, 0xe, 0x65, (long)0x1000000000000000);
         SampleEvt_UserChannel_UINT8 = new EventDescriptor(0x259, 0x0, 0x11, 0x2, 0x5, 0x66, (long)0x1000000000000000);
         SampleEvt_UserKeyword_UINT8 = new EventDescriptor(0x25a, 0x0, 0x11, 0x2, 0x6, 0x66, (long)0x1000000000000020);
         SampleEvt_Alignment_UInt8_UnicodeString = new EventDescriptor(0x25b, 0x0, 0x11, 0x2, 0xc, 0x66, (long)0x1000000000000020);
         SampleEvt_ValueMap_UInt8 = new EventDescriptor(0x25d, 0x0, 0x11, 0x2, 0xd, 0x66, (long)0x1000000000000020);
         SampleEvt_BitMap_UInt8 = new EventDescriptor(0x25e, 0x0, 0x11, 0x2, 0xe, 0x66, (long)0x1000000000000020);
         SampleEvt_UInt32_Win32Error = new EventDescriptor(0x2bc, 0x0, 0x11, 0x3, 0x5, 0x67, (long)0x1000000000000000);
         SampleEvt_UInt32_NTSTATUS = new EventDescriptor(0x2bd, 0x0, 0x11, 0x3, 0x6, 0x67, (long)0x1000000000000000);
         SampleEvt_Int32_HResult = new EventDescriptor(0x2be, 0x0, 0x11, 0x3, 0xc, 0x67, (long)0x1000000000000000);
         SampleEvt_INT8_V1 = new EventDescriptor(0x66, 0x1, 0x8, 0x1, 0xd, 0x67, (long)0x8000000000000000);
         SampleEvt_INT8_V2 = new EventDescriptor(0x66, 0x2, 0x8, 0x1, 0xe, 0x67, (long)0x8000000000000000);
         SampleEvt_UnicodeString_V1 = new EventDescriptor(0xc8, 0x1, 0x9, 0x4, 0x5, 0x68, (long)0x4000000000000000);
         SampleEvt_FixedCount_Int8_V1 = new EventDescriptor(0x12c, 0x1, 0x11, 0x3, 0x6, 0x68, (long)0x1000000000000000);
         SampleEvt_FixedCount_Int8_V3 = new EventDescriptor(0x12c, 0x3, 0x11, 0x3, 0xc, 0x68, (long)0x1000000000000000);
         SampleEvt_Int32_HResult_V2 = new EventDescriptor(0x2be, 0x2, 0x11, 0x3, 0xd, 0x68, (long)0x1000000000000000);
     }
 }
开发者ID:dbremner,项目名称:Windows-classic-samples,代码行数:47,代码来源:AdvancedProviderEvents.cs


示例15: TemplateT_ParamLength_UnicodeString

        internal unsafe bool TemplateT_ParamLength_UnicodeString(
            ref EventDescriptor eventDescriptor,
            uint Prop_ParamLength_UnicodString_Length,
            string Prop_ParamLength_UnicodeString
            )
        {
            int argumentCount = 2;
            bool status = true;

            if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
            {
                byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
                EventData* userDataPtr = (EventData*)userData;

                userDataPtr[0].DataPointer = (UInt64)(&Prop_ParamLength_UnicodString_Length);
                userDataPtr[0].Size = (uint)(sizeof(int)  );

                userDataPtr[1].Size = (uint)(sizeof(char)*Prop_ParamLength_UnicodString_Length);

                fixed (char* a0 = Prop_ParamLength_UnicodeString)
                {
                    userDataPtr[1].DataPointer = (ulong)a0;
                    status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
                }
            }

            return status;
        }
开发者ID:dbremner,项目名称:Windows-classic-samples,代码行数:28,代码来源:AdvancedProviderEvents.cs


示例16: TemplateT_FixedCount_Int8

        internal unsafe bool TemplateT_FixedCount_Int8(
            ref EventDescriptor eventDescriptor,
            sbyte[] Prop_FixedCount_Int8
            )
        {
            int argumentCount = 1;
            bool status = true;

            if (IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords))
            {
                byte* userData = stackalloc byte[sizeof(EventData) * argumentCount];
                EventData* userDataPtr = (EventData*)userData;

                userDataPtr[0].Size = (uint)(sizeof(byte)*15);

                fixed (sbyte* a0 = Prop_FixedCount_Int8)
                {
                    userDataPtr[0].DataPointer = (ulong)a0;
                    status = WriteEvent(ref eventDescriptor, argumentCount, (IntPtr)(userData));
                }
            }

            return status;
        }
开发者ID:dbremner,项目名称:Windows-classic-samples,代码行数:24,代码来源:AdvancedProviderEvents.cs


示例17: WriteEvent

        /// <summary>
        /// Writes an event
        /// </summary>
        /// <param name="id"></param>
        /// <param name="channel"></param>
        /// <param name="opcode"></param>
        /// <param name="level"></param>
        /// <param name="task"></param>
        /// <param name="keyword"></param>
        /// <param name="args"></param>
        internal void WriteEvent(PSEventId id, PSChannel channel, PSOpcode opcode, PSLevel level, PSTask task, PSKeyword keyword, params object[] args)
        {
            long longKeyword = 0x00;

            if (keyword == PSKeyword.UseAlwaysAnalytic ||
                keyword == PSKeyword.UseAlwaysOperational)
            {
                longKeyword = 0x00;
            }
            else
            {
                longKeyword = (long)keyword;
            }

            EventDescriptor desc = new EventDescriptor((int)id, (byte)PSEventVersion.One, (byte)channel,
                (byte)level, (byte)opcode, (int)task, longKeyword);

            etwProvider.WriteEvent(ref desc, args);
        }
开发者ID:40a,项目名称:PowerShell,代码行数:29,代码来源:PSEtwLogProvider.cs


示例18: EtwEventArgs

 /// <summary>
 /// Creates a new instance of EtwEventArgs class.
 /// </summary>
 /// <param name="descriptor">Event descriptor</param>
 /// <param name="success">Indicate whether the event is successfully written</param>
 /// <param name="payload">Event payload</param>
 public EtwEventArgs(EventDescriptor descriptor, bool success, object[] payload)
 {
     this.Descriptor = descriptor;
     this.Payload = payload;
     this.Success = success;
 }
开发者ID:40a,项目名称:PowerShell,代码行数:12,代码来源:EtwActivity.cs


示例19: WriteEvent

 protected bool WriteEvent(ref EventDescriptor eventDescriptor, int dataCount, IntPtr data)
 {
   return default(bool);
 }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:4,代码来源:System.Diagnostics.Eventing.EventProvider.cs


示例20: WriteTransferEvent

 protected bool WriteTransferEvent(ref EventDescriptor eventDescriptor, Guid relatedActivityId, int dataCount, IntPtr data)
 {
   return default(bool);
 }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:4,代码来源:System.Diagnostics.Eventing.EventProvider.cs



注:本文中的System.Diagnostics.Eventing.EventDescriptor类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Reader.EventLogHandle类代码示例发布时间:2022-05-26
下一篇:
C# Diagnostics.TraceSwitch类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap