SetConsoleCtrlHandler function kernel32

int SetConsoleCtrlHandler(
  1. Pointer<NativeFunction<PHANDLER_ROUTINE>> HandlerRoutine,
  2. int Add
)

Adds or removes an application-defined HandlerRoutine function from the list of handler functions for the calling process.

BOOL SetConsoleCtrlHandler(
  _In_opt_ PHANDLER_ROUTINE HandlerRoutine,
  _In_     BOOL             Add
);

Implementation

int SetConsoleCtrlHandler(
        Pointer<NativeFunction<PHANDLER_ROUTINE>> HandlerRoutine, int Add) =>
    _SetConsoleCtrlHandler(HandlerRoutine, Add);