()
| 581 | } |
| 582 | |
| 583 | pub fn get_last_error() -> u32 |
| 584 | { |
| 585 | unsafe |
| 586 | { |
| 587 | let ret: Option<u32>; |
| 588 | let func_ptr: data::GetLastError; |
| 589 | let module_base_address = get_module_base_address(&lc!("kernel32.dll")); |
| 590 | dynamic_invoke!(module_base_address,&lc!("GetLastError"),func_ptr,ret,); |
| 591 | |
| 592 | match ret { |
| 593 | Some(x) => return x, |
| 594 | None => return 0xf, |
| 595 | } |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | /// Dynamically calls SetHandleInformation. |
| 600 | /// |
no test coverage detected