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); }
public static byte[] GetEventViewerOutput(EventViewerDisplayOptions options) { byte[] buffer = new byte[340 * 2 * 262 * 2 * 4]; DebugApi.GetEventViewerOutputWrapper(buffer, options); return(buffer); }
[DllImport(DllPath, EntryPoint = "GetEventViewerOutput")] private static extern void GetEventViewerOutputWrapper([In, Out] byte[] buffer, EventViewerDisplayOptions options);
[DllImport(DllPath)] public static extern void TakeEventSnapshot(EventViewerDisplayOptions options);
[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);
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); }
[DllImport(DllPath)] public static extern UInt32 TakeEventSnapshot(CpuType cpuType, EventViewerDisplayOptions options);
[DllImport(DllPath)] public static extern void GetEventViewerEvent(CpuType cpuType, ref DebugEventInfo evtInfo, UInt16 scanline, UInt16 cycle, EventViewerDisplayOptions options);