Retrieves the address of an exported function from the specified module by its ordinal. In case that the function's address can't be retrieved, it will return 0. This functions internally calls LdrGetProcedureAddress. # Examples ``` let ntdll = dinvoke::get_module_base_address("ntdll.dll"); if ntdll != 0 { let ordinal: u32 = 8; let addr = dinvoke::get_function_address_ordinal(ntdll, 8); print
(module_base_address: isize, ordinal: u32)
| 180 | /// } |
| 181 | /// ``` |
| 182 | pub fn get_function_address_by_ordinal(module_base_address: isize, ordinal: u32) -> isize { |
| 183 | |
| 184 | let ret = ldr_get_procedure_address(module_base_address, "", ordinal); |
| 185 | |
| 186 | match ret { |
| 187 | Ok(r) => return r, |
| 188 | Err(_) => return 0, |
| 189 | } |
| 190 | |
| 191 | } |
| 192 | |
| 193 | /// Retrieves the address of an exported function from the specified module either by its name |
| 194 | /// or by its ordinal number. |
nothing calls this directly
no test coverage detected