(
h: WinHandle,
vm: &VirtualMachine,
)
| 210 | |
| 211 | #[pyfunction] |
| 212 | fn GetFileType( |
| 213 | h: WinHandle, |
| 214 | vm: &VirtualMachine, |
| 215 | ) -> PyResult<windows_sys::Win32::Storage::FileSystem::FILE_TYPE> { |
| 216 | let file_type = unsafe { windows_sys::Win32::Storage::FileSystem::GetFileType(h.0) }; |
| 217 | if file_type == 0 && unsafe { windows_sys::Win32::Foundation::GetLastError() } != 0 { |
| 218 | Err(vm.new_last_os_error()) |
| 219 | } else { |
| 220 | Ok(file_type) |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | #[pyfunction] |
| 225 | fn GetLastError() -> u32 { |
no test coverage detected