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);
 }
Exemple #2
0
 private 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);
     }
 }
Exemple #3
0
        private 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);
            }
        }
Exemple #4
0
 public static extern Int32 TdhGetEventInformation(
     ref EVENT_RECORD Event,
     UInt32 TdhContextCount,
     IntPtr TdhContext,
     [Out] IntPtr eventInfoPtr,
     ref Int32 BufferSize);
Exemple #5
0
 public static extern Int32 TdhGetEventMapInformation(
     ref EVENT_RECORD pEvent,
     IntPtr pMapName,
     [Out] IntPtr eventMapInfoPtr,
     ref Int32 BufferSize);
Exemple #6
0
 public static extern Int32 TdhGetEventInformation(
     ref EVENT_RECORD Event,
     UInt32 TdhContextCount,
     IntPtr TdhContext,
     [Out] IntPtr eventInfoPtr,
     ref Int32 BufferSize);