public static DebugEventInfo[] GetDebugEvents(EventViewerDisplayOptions options)
        {
            UInt32 maxEventCount = GetDebugEventCount(options);

            DebugEventInfo[] debugEvents = new DebugEventInfo[maxEventCount];

            DebugApi.GetDebugEventsWrapper(debugEvents, ref maxEventCount);
            if (maxEventCount < debugEvents.Length)
            {
                //Remove the excess from the array if needed
                Array.Resize(ref debugEvents, (int)maxEventCount);
            }

            return(debugEvents);
        }
Example #2
0
 public static byte[] GetEventViewerOutput(EventViewerDisplayOptions options)
 {
     byte[] buffer = new byte[340 * 2 * 262 * 2 * 4];
     DebugApi.GetEventViewerOutputWrapper(buffer, options);
     return(buffer);
 }
Example #3
0
 [DllImport(DllPath, EntryPoint = "GetEventViewerOutput")] private static extern void GetEventViewerOutputWrapper([In, Out] byte[] buffer, EventViewerDisplayOptions options);
Example #4
0
 [DllImport(DllPath)] public static extern void TakeEventSnapshot(EventViewerDisplayOptions options);
Example #5
0
 [DllImport(DllPath)] public static extern DebugEventInfo GetEventViewerEvent(UInt16 scanline, UInt16 cycle, EventViewerDisplayOptions options);
 public static byte[] GetEventViewerOutput(UInt32 scanlineCount, EventViewerDisplayOptions options)
 {
     byte[] buffer = new byte[340 * 2 * scanlineCount * 2 * 4];
     DebugApi.GetEventViewerOutputWrapper(buffer, options);
     return(buffer);
 }
 [DllImport(DllPath)] private static extern UInt32 GetDebugEventCount(EventViewerDisplayOptions options);
Example #8
0
        public static byte[] GetEventViewerOutput(int scanlineWidth, UInt32 scanlineCount, EventViewerDisplayOptions options)
        {
            UInt32 bufferSize = (UInt32)(scanlineWidth * scanlineCount * 2 * 4);

            byte[] buffer = new byte[bufferSize];
            DebugApi.GetEventViewerOutputWrapper(buffer, bufferSize, options);
            return(buffer);
        }
Example #9
0
 [DllImport(DllPath)] public static extern UInt32 TakeEventSnapshot(CpuType cpuType, EventViewerDisplayOptions options);
Example #10
0
 [DllImport(DllPath)] public static extern void GetEventViewerEvent(CpuType cpuType, ref DebugEventInfo evtInfo, UInt16 scanline, UInt16 cycle, EventViewerDisplayOptions options);