use std::ffi::OsStr;
use std::iter::once;
use std::os::windows::ffi::OsStrExt;
use winapi::um::errhandlingapi::GetLastError;
pub fn win32_string(s: &str) -> Vec<u16> {
OsStr::new(s).encode_wide().chain(once(0)).collect()
}
pub fn last_error() -> u32 {
unsafe { GetLastError() }
}