Can the current process detect the signal?

Can the current process detect the signal need to process?
The paramet Alertable can be set TRUE in function KeWaitForSingleObject,then we can check if the Return Value is STATUS_ALERTED.

But I want to know if a MACRO exist that can represent current process receiving a signal such as “ctrl+c” or “ctrl+z” by user.

From a driver, no. These are not implemented as alerts on current versions of the platform and there’s no way to register to be directly notified for those events in kernel mode.

A user mode program may call SetConsoleCtrlHandler to register for ctrl-c/ctrl-break notifications.

  • S

From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com.cn [xxxxx@yahoo.com.cn]
Sent: Saturday, April 03, 2010 8:51 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Can the current process detect the signal?

Can the current process detect the signal need to process?
The paramet Alertable can be set TRUE in function KeWaitForSingleObject,then we can check if the Return Value is STATUS_ALERTED.

But I want to know if a MACRO exist that can represent current process receiving a signal such as “ctrl+c” or “ctrl+z” by user.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer