(name: *const c_char)
| 141 | |
| 142 | #[sysv64] |
| 143 | unsafe fn dlopen(name: *const c_char) -> *mut c_void { |
| 144 | use crate::hook_manager::get_hooks; |
| 145 | let mut path_str = CStr::from_ptr(name).to_str().unwrap(); |
| 146 | |
| 147 | let _path: String; |
| 148 | #[cfg(target_family = "windows")] |
| 149 | { |
| 150 | _path = path_str.chars() |
| 151 | .map(|x| match x { |
| 152 | '\\' => '/', |
| 153 | c => c |
| 154 | }).collect::<String>(); |
| 155 | |
| 156 | path_str = _path.as_str(); |
| 157 | } |
| 158 | |
| 159 | info!("Loading {}", path_str); |
| 160 | match Self::load(path_str) { |
| 161 | Ok(lib) => Box::into_raw(Box::new(lib)) as *mut c_void, |
| 162 | Err(_) => null_mut(), |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | #[sysv64] |
| 167 | unsafe fn dlsym(library: *mut AndroidLibrary, symbol: *const c_char) -> *mut c_void { |
nothing calls this directly
no outgoing calls
no test coverage detected