Hi,
i try to use "setconsolemode" to disable ctrl-c usage during elaboration process in a console application.
i can't retrive information or same example of using it unfer CVF.
MSDN is not so clear for me about how to set ENABLE_processed_input (or other property) to "disable".
have you some short examples about it.
thanks
i try to use "setconsolemode" to disable ctrl-c usage during elaboration process in a console application.
i can't retrive information or same example of using it unfer CVF.
MSDN is not so clear for me about how to set ENABLE_processed_input (or other property) to "disable".
have you some short examples about it.
thanks
連結已複製
2 回應
I haven't used SetConsoleMode, but, having skimmed through documentation, I think it should be
hConsole = GetStdHandle(STD_INPUT_HANDLE)
bSt= GetConsoleMode(hConsole, LOC(iMode))
iMode = IAND(iMode, NOT(ENABLE_PROCESSED_INPUT))
bSt = SetConsoleMode(hConsole, iMode)
Also, take a look at SetConsoleCtrlHandler.
Jugoslav