feat: stop hook

fix/data-structure
paring 2022-11-03 19:38:37 +09:00
parent 52dcfd0614
commit aecd793830
Signed by: pikokr
GPG Key ID: DB839724AD14EC9F
1 changed files with 8 additions and 1 deletions

View File

@ -62,4 +62,11 @@ pub extern "C" fn start_hook(callback: extern "C" fn(NativeEvent)) -> *const c_c
}
#[no_mangle]
pub extern "C" fn stop_hook() {}
pub extern "C" fn stop_hook() -> *const c_char {
if let Err(e) = skyhook::stop() {
let cstr = CString::new(e.message).unwrap();
return cstr.as_ptr();
}
null()
}