IOCTL_CONSOLE_SETCONTROLCEVENT

Other versions of this page are also available for the following:
Windows Mobile Not SupportedWindows Embedded CE Supported
8/28/2008

This I/O control code (IOCTL) allows a console application to stop its current process by using the keyboard command CRTL+C. The DeviceIoControl function calls this IOCTL.

This replaces the deprecated IOCTL_CONSOLE_SETCONTROLCHANDLER.

hDevice

[in] Set to the handle of the device.

dwIoControlCode

[in] Set to IOCTL_CONSOLE_SETCONTROLCHANDLER.

lpInBuf

[in] Set to the handle for the console's current process.

nInBufSize

[in] Set to sizeof(DWORD).

Calling this the first time will turn enable the console to stop the indicated process by using CTRL+C. Passing the same process in on a second call will disable the console from stopping the process on CTRL+C.

TRUE indicates success. FALSE indicates failure.

Headerconsole.h
Windows Embedded CEWindows CE 3.0 and later

Community Additions

Show: