Skip to content
Myr

Fix winapi type definition change

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Clemens Wasser · committed by David Peter · parent 2763b41 · Browse files · 1 file+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:src/timer/windows_timer.rs+4 added-2 removed
46 unmodified lines
47}4849impl CPUTimer {50 pub unsafe fn start_suspended_process(child: &process::Child) -> Self {51 let child_handle = child.as_raw_handle().cast();5253 // SAFETY: Creating a new job object is safe54 let job_object = unsafe { CreateJobObjectW(ptr::null_mut(), ptr::null_mut()) };55 assert!(!job_object.is_null(), "CreateJobObjectW failed");5657 // SAFETY: The job object handle is valid56 let ret = unsafe { AssignProcessToJobObject(job_object, child.as_raw_handle()) };58 let ret = unsafe { AssignProcessToJobObject(job_object, child_handle) };59 assert!(ret != 0, "AssignProcessToJobObject failed");6061 #[cfg(windows_process_extensions_main_thread_handle)]62 {
8 unmodified lines
71 // the undocumented but widely known `NtResumeProcess` function to72 // resume a process by it's handle.7374 // SAFETY: The process handle is valid73 let ret = unsafe { NtResumeProcess(child.as_raw_handle()) };75 let ret = unsafe { NtResumeProcess(child_handle) };76 assert!(ret == STATUS_SUCCESS, "NtResumeProcess failed");77 }7879 Self { job_object }
45 unmodified lines