| 1 | windows_link::link!("kernel32.dll" "system" fn CloseHandle(hobject : HANDLE) -> BOOL); |
| 2 | windows_link::link!("kernel32.dll" "system" fn CreateEventW(lpeventattributes : *const SECURITY_ATTRIBUTES, bmanualreset : BOOL, binitialstate : BOOL, lpname : PCWSTR) -> HANDLE); |
| 3 | windows_link::link!("kernel32.dll" "system" fn SetEvent(hevent : HANDLE) -> BOOL); |
| 4 | windows_link::link!("kernel32.dll" "system" fn WaitForSingleObject(hhandle : HANDLE, dwmilliseconds : u32) -> WAIT_EVENT); |
| 5 | pub type BOOL = i32; |
| 6 | pub type HANDLE = *mut core::ffi::c_void; |
| 7 | pub type PCWSTR = *const u16; |
| 8 | #[repr (C)] |
| 9 | #[derive (Clone, Copy)] |
| 10 | pub struct SECURITY_ATTRIBUTES { |
| 11 | pub nLength: u32, |
| 12 | pub lpSecurityDescriptor: *mut core::ffi::c_void, |
| 13 | pub bInheritHandle: BOOL, |
| 14 | } |
| 15 | impl Default for SECURITY_ATTRIBUTES { |
| 16 | fn default() -> Self { |
| 17 | unsafe { core::mem::zeroed() } |
| 18 | } |
| 19 | } |
| 20 | pub type WAIT_EVENT = u32; |
| 21 | |