예제 #1
0
 public DirectInputGenerator(EventSize size)
     : base(size)
 {
     _record = new EVENT_RECORD();
     _recordHandle = GCHandle.Alloc(_record, GCHandleType.Pinned);
     _record.EventHeader.ProviderId = new Guid("3838EF9A-CB6F-4A1C-9033-84C0E8EBF5A7");
     _record.EventHeader.EventDescriptor.Id = (ushort)size;
     _record.UserData = EventData.AddrOfPinnedObject();
     _record.UserDataLength = (ushort)Marshal.SizeOf(EventData.Target);
 }
예제 #2
0
파일: EtwListener.cs 프로젝트: nopcoder/rx
 unsafe void EtwCallback(ref EVENT_RECORD record)
 {
     fixed (EVENT_RECORD* p = &record)
     {
         EtwNativeEvent evt;
         evt.record = p;
         evt._data = (byte*)record.UserData.ToPointer();
         evt._end = evt._data + record.UserDataLength;
         evt._length = 0;
         _observer.OnNext(evt);
     }
 }
예제 #3
0
 public static extern Int32 TdhGetEventInformation(
     ref EVENT_RECORD Event,
     UInt32 TdhContextCount,
     IntPtr TdhContext,
     [Out] IntPtr eventInfoPtr,
     ref Int32 BufferSize);