@Override public Struct convertCallback(FunctionSignature functionSignature, Signatures signatures, Identifier callerLibraryName) { Struct decl = super.convertCallback(functionSignature, signatures, callerLibraryName); if (decl != null) { List<Modifier> mods = functionSignature.getFunction().getModifiers(); decl.setParents(Arrays.asList((SimpleTypeRef) typeRef( functionSignature.getFunction().hasModifier(ModifierType.__stdcall) ? StdCallLibrary.StdCallCallback.class : result.config.runtime.callbackClass))); } return decl; }
/** * Native call to the Kernel32 API to set a new Console Ctrl Handler. * * @return true if the handler is correctly set * @throws java.lang.UnsatisfiedLinkError if the Kernel32 library is not loaded or if the native function is not found * @throws java.lang.NoClassDefFoundError if the library for native calls is missing */ native boolean SetConsoleCtrlHandler(StdCallLibrary.StdCallCallback handler, boolean add);