What would be the best way to setup PInvoke.SetConsoleCtrlHandler? #1249
Unanswered
AY1uZwIcJzKhaGywovQP
asked this question in
Q&A
Replies: 1 comment
-
Hi! private static readonly Windows.Win32.System.Console.PHANDLER_ROUTINE _consoleCtrlHandler = new(ConsoleCtrlCheck);
static void Main(string[] args)
{
PInvoke.SetConsoleCtrlHandler(_consoleCtrlHandler, true);
}
private static Windows.Win32.Foundation.BOOL ConsoleCtrlCheck(uint ctrlType)
{
// TODO
return true;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I try, I get the following error (sanitized):
My current approach is:
Beta Was this translation helpful? Give feedback.
All reactions