12-15-2022 12:29 PM
I have a LabWindows application that displays video from a radar through a frame grabber and draws track symbols on top of the video. The program uses a 1-Hz asynchronous timer. When the timer event happens, the program calls InvalidateRect/UpdateWindow on the display window to generate a Windows WM_PAINT message. The function invoked by this message redraws the symbols.
We had a problem where the program was causing a General Protection Fault when the screen was locked and unlocked, either by the user locking the screen manually or when the PC went to sleep after 15 minutes. I put in a code change to fix this. However, the program still crashes when the user presses Ctrl-Alt-Del and then either presses Cancel or brings up the Task Manager.
Is there a way to fix this?
12-16-2022 02:40 AM
Hello,
how are you handling EVENT_END_TASK / EVENT_CLOSE ?
I don't think there's any specific event for sleep/wake or screen lock/unlock, but I always disable the former on acquisition systems.
12-16-2022 07:48 AM
EVENT_CLOSE on the main panel brings up an exit dialog. I don't have any special processing for EVENT_END_TASK.