Beispiel #1
0
        public static DebugEventInfo[] GetDebugEvents(bool getPreviousFrameData)
        {
            UInt32 maxEventCount = GetDebugEventCount(getPreviousFrameData);

            DebugEventInfo[] debugEvents = new DebugEventInfo[maxEventCount];

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

            return(debugEvents);
        }
        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);
        }
 [DllImport(DllPath)] public static extern void GetEventViewerEvent(ref DebugEventInfo evtInfo, UInt16 scanline, UInt16 cycle, EventViewerDisplayOptions options);