[PATCH] cmd: Add basic handling of Ctrl-C
Hugh McMaster
hugh.mcmaster at outlook.com
Thu Mar 26 07:46:58 CDT 2015
On Thu, 26 Mar 2015 14:39:12 +0300, Nikolay Sivov wrote:
> On 26.03.2015 14:32, Hugh McMaster wrote:
>> + /* Enable handling of Ctrl-C signals */
>> + if (SetConsoleCtrlHandler((PHANDLER_ROUTINE)console_ctrl_handler, TRUE))
>> + WINE_TRACE("cmd: Ctrl handler was installed.\n");
>> + else
>> + WINE_ERR("cmd: Unable to install Ctrl handler.\n");
>> +
>
> Judging by the fact that you needed a cast, that's not right.
The PHANDLER_ROUTINE is a pointer to the function handler. MSDN's own example [1] on installing a Ctrl handler uses a cast.
Otherwise, what would you suggest?
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms685049%28v=vs.85%29.aspx
More information about the wine-devel
mailing list