fix win32 build.rs
This commit is contained in:
parent
59604a03ae
commit
b769ae433b
@ -1,7 +1,7 @@
|
||||
fn main() {
|
||||
#[cfg(target_os = "windows")]
|
||||
windows::build!(
|
||||
windows::win32::system_services::{HANDLE, PSTR},
|
||||
windows::win32::system_services::{HANDLE},
|
||||
windows::win32::windows_programming::CloseHandle,
|
||||
// API needed for the shared memory
|
||||
windows::win32::system_services::{CreateFileMappingA, OpenFileMappingA, MapViewOfFile, UnmapViewOfFile},
|
||||
|
@ -446,10 +446,10 @@ pub mod shmem {
|
||||
use super::ShMem;
|
||||
use crate::{
|
||||
bolts::bindings::{
|
||||
windows::win32::system_services::HANDLE,
|
||||
windows::win32::system_services::{
|
||||
CreateFileMappingA, MapViewOfFile, OpenFileMappingA, UnmapViewOfFile,
|
||||
},
|
||||
windows::win32::system_services::{HANDLE},
|
||||
windows::win32::windows_programming::CloseHandle,
|
||||
},
|
||||
Error,
|
||||
@ -516,8 +516,8 @@ pub mod shmem {
|
||||
String::from_utf8_lossy(map_str_bytes)
|
||||
)));
|
||||
}
|
||||
let map =
|
||||
MapViewOfFile(handle.clone(), FILE_MAP_ALL_ACCESS, 0, 0, map_size as u32) as *mut u8;
|
||||
let map = MapViewOfFile(handle.clone(), FILE_MAP_ALL_ACCESS, 0, 0, map_size as u32)
|
||||
as *mut u8;
|
||||
if map == ptr::null_mut() {
|
||||
return Err(Error::Unknown(format!(
|
||||
"Cannot map shared memory {}",
|
||||
@ -552,8 +552,8 @@ pub mod shmem {
|
||||
String::from_utf8_lossy(map_str_bytes)
|
||||
)));
|
||||
}
|
||||
let map =
|
||||
MapViewOfFile(handle.clone(), FILE_MAP_ALL_ACCESS, 0, 0, map_size as u32) as *mut u8;
|
||||
let map = MapViewOfFile(handle.clone(), FILE_MAP_ALL_ACCESS, 0, 0, map_size as u32)
|
||||
as *mut u8;
|
||||
if map == ptr::null_mut() {
|
||||
return Err(Error::Unknown(format!(
|
||||
"Cannot map shared memory {}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user