(
std_handle: windows_sys::Win32::System::Console::STD_HANDLE,
vm: &VirtualMachine,
)
| 133 | |
| 134 | #[pyfunction] |
| 135 | fn GetStdHandle( |
| 136 | std_handle: windows_sys::Win32::System::Console::STD_HANDLE, |
| 137 | vm: &VirtualMachine, |
| 138 | ) -> PyResult<Option<WinHandle>> { |
| 139 | let handle = unsafe { windows_sys::Win32::System::Console::GetStdHandle(std_handle) }; |
| 140 | if handle == windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE { |
| 141 | return Err(vm.new_last_os_error()); |
| 142 | } |
| 143 | Ok(if handle.is_null() { |
| 144 | // NULL handle - return None |
| 145 | None |
| 146 | } else { |
| 147 | Some(WinHandle(handle)) |
| 148 | }) |
| 149 | } |
| 150 | |
| 151 | #[pyfunction] |
| 152 | fn CreatePipe( |
no test coverage detected