(address: isize, vm: &VirtualMachine)
| 1998 | /// UnmapViewOfFile - Unmap a mapped view of a file. |
| 1999 | #[pyfunction] |
| 2000 | fn UnmapViewOfFile(address: isize, vm: &VirtualMachine) -> PyResult<()> { |
| 2001 | use windows_sys::Win32::System::Memory::MEMORY_MAPPED_VIEW_ADDRESS; |
| 2002 | |
| 2003 | let view = MEMORY_MAPPED_VIEW_ADDRESS { |
| 2004 | Value: address as *mut core::ffi::c_void, |
| 2005 | }; |
| 2006 | let ret = unsafe { windows_sys::Win32::System::Memory::UnmapViewOfFile(view) }; |
| 2007 | |
| 2008 | if ret == 0 { |
| 2009 | return Err(vm.new_last_os_error()); |
| 2010 | } |
| 2011 | Ok(()) |
| 2012 | } |
| 2013 | |
| 2014 | /// VirtualQuerySize - Return the size of a memory region. |
| 2015 | #[pyfunction] |
no test coverage detected