boolean addConsoleCtrlHandler(ConsoleCtrlHandler handler){
  boolean result=false;
  if (handler != null) {
    NativeHandlerCallback callback=new NativeHandlerCallback(handler);
    result=SetConsoleCtrlHandler(callback,true);
    if (result) {
      callbacks.add(callback);
    }
  }
  return result;
}

boolean addConsoleCtrlHandler ( ConsoleCtrlHandler handler ) { boolean result = false ; if ( handler != null ) { NativeHandlerCallback callback = new NativeHandlerCallback ( handler ) ; result = SetConsoleCtrlHandler ( callback , true ) ; if ( result ) { callbacks . add ( callback ) ; } } return result ; }
adds a console ctrl handler .
