(
desired_access: u32,
inherit_handle: bool,
process_id: u32,
vm: &VirtualMachine,
)
| 357 | |
| 358 | #[pyfunction] |
| 359 | fn OpenProcess( |
| 360 | desired_access: u32, |
| 361 | inherit_handle: bool, |
| 362 | process_id: u32, |
| 363 | vm: &VirtualMachine, |
| 364 | ) -> PyResult<WinHandle> { |
| 365 | let handle = unsafe { |
| 366 | windows_sys::Win32::System::Threading::OpenProcess( |
| 367 | desired_access, |
| 368 | i32::from(inherit_handle), |
| 369 | process_id, |
| 370 | ) |
| 371 | }; |
| 372 | if handle.is_null() { |
| 373 | return Err(vm.new_last_os_error()); |
| 374 | } |
| 375 | Ok(WinHandle(handle)) |
| 376 | } |
| 377 | |
| 378 | #[pyfunction] |
| 379 | fn ExitProcess(exit_code: u32) { |
no test coverage detected