The GenerateConsoleCtrlEvent function sends a specified signal to a console process group that shares the console associated with the calling process.
BOOL GenerateConsoleCtrlEvent(
DWORD dwCtrlEvent, |
// signal to generate |
DWORD dwProcessGroupId |
// process group to get signal |
); |
Value |
Meaning |
CTRL_C_EVENT |
Generates a CTRL+C signal. |
CTRL_BREAK_EVENT |
Generates a CTRL+BREAK signal. |
If this parameter is zero, the signal is generated in all processes that share the console of the calling process.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
GenerateConsoleCtrlEvent causes the control handler functions of processes in the target group to be called. All console processes have a default handler function that calls the ExitProcess function. A console process can use the SetConsoleCtrlHandler function to install or remove other handler functions.
SetConsoleCtrlHandler can also enable an inheritable attribute that causes the calling process to ignore CTRL+C signals. If GenerateConsoleCtrlEvent sends a CTRL+C signal to a process for which this attribute is enabled, the handler functions for that process are not called. CTRL+BREAK signals always cause the handler functions to be called.
CreateProcess, ExitProcess, SetConsoleCtrlHandler
file: /Techref/os/win/api/win32/func/src/f26_16.htm, 4KB, , updated: 2000/4/7 11:19, local time: 2024/11/12 17:05,
3.129.253.148:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/os/win/api/win32/func/src/f26_16.htm"> GenerateConsoleCtrlEvent</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.