Dynamically calls NtOpenProcess. It will return the NTSTATUS value returned by the call.
(handle: *mut HANDLE, desired_access: u32, attributes: *mut OBJECT_ATTRIBUTES, client_id: *mut CLIENT_ID)
| 772 | /// |
| 773 | /// It will return the NTSTATUS value returned by the call. |
| 774 | pub fn nt_open_process(handle: *mut HANDLE, desired_access: u32, attributes: *mut OBJECT_ATTRIBUTES, client_id: *mut CLIENT_ID) -> i32 { |
| 775 | |
| 776 | unsafe |
| 777 | { |
| 778 | let ret; |
| 779 | let func_ptr: data::NtOpenProcess; |
| 780 | let ntdll = get_module_base_address(&lc!("ntdll.dll")); |
| 781 | dynamic_invoke!(ntdll,&lc!("NtOpenProcess"),func_ptr,ret,handle,desired_access,attributes,client_id); |
| 782 | |
| 783 | match ret { |
| 784 | Some(x) => return x, |
| 785 | None => return -1, |
| 786 | } |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | /// Dynamically calls NtDuplicateObject. |
| 791 | /// |
no test coverage detected