|  | 
| 1 | 1 | use super::*; | 
| 2 | 2 | use std::ffi::c_void; | 
| 3 | 3 | 
 | 
| 4 |  | -link!("kernel32.dll""system" fn CloseHandle(handle: isize) -> i32); | 
| 5 |  | -link!("kernel32.dll" "system" fn GetLastError() -> u32); | 
| 6 |  | -link!("oleaut32.dll" "system" fn SysAllocStringLen(input: *const u16, len: u32) -> *const u16); | 
| 7 |  | -link!("oleaut32.dll" "system" fn SysFreeString(bstr: *const u16) -> ()); | 
| 8 |  | -link!("oleaut32.dll" "system" fn SysStringLen(bstr: *const u16) -> u32); | 
| 9 |  | -link!("ole32.dll" "system" fn CoCreateGuid(guid: *mut GUID) -> HRESULT); | 
| 10 |  | -link!("ole32.dll" "system" fn CoTaskMemAlloc(len: usize) -> *mut c_void); | 
| 11 |  | -link!("ole32.dll" "system" fn CoTaskMemFree(ptr: *const c_void) -> ()); | 
| 12 |  | -link!("oleaut32.dll" "system" fn GetErrorInfo(reserved: u32, info: *mut *mut c_void) -> HRESULT); | 
| 13 |  | -link!("oleaut32.dll" "system" fn SetErrorInfo(reserved: u32, info: *const c_void) -> HRESULT); | 
|  | 4 | +link!("kernel32.dll" "system" fn CreateEventW(attributes: *const c_void, manual_reset: i32, initial_state: i32, name: *const c_void) -> isize); | 
| 14 | 5 | link!("kernel32.dll" "system" fn EncodePointer(ptr: *const c_void) -> *mut c_void); | 
| 15 | 6 | link!("kernel32.dll" "system" fn FormatMessageW(flags: u32, source: *const c_void, code: u32, lang: u32, buffer: PWSTR, len: u32, args: *const *const i8) -> u32); | 
|  | 7 | +link!("kernel32.dll" "system" fn FreeLibrary(library: isize) -> i32); | 
|  | 8 | +link!("kernel32.dll" "system" fn GetLastError() -> u32); | 
|  | 9 | +link!("kernel32.dll" "system" fn GetProcAddress(library: isize, name: PCSTR) -> *const std::ffi::c_void); | 
| 16 | 10 | link!("kernel32.dll" "system" fn GetProcessHeap() -> isize); | 
| 17 | 11 | link!("kernel32.dll" "system" fn HeapAlloc(heap: isize, flags: u32, len: usize) -> *mut c_void); | 
| 18 | 12 | link!("kernel32.dll" "system" fn HeapFree(heap: isize, flags: u32, ptr: *const c_void) -> i32); | 
| 19 |  | -link!("kernel32.dll" "system" fn CreateEventW(attributes: *const c_void, manual_reset: i32, initial_state: i32, name: *const c_void) -> isize); | 
| 20 |  | -link!("kernel32.dll" "system" fn WaitForSingleObject(handle: isize, milliseconds: u32) -> u32); | 
|  | 13 | +link!("kernel32.dll" "system" fn LoadLibraryA(name: PCSTR) -> isize); | 
| 21 | 14 | link!("kernel32.dll" "system" fn SetEvent(handle: isize) -> i32); | 
|  | 15 | +link!("kernel32.dll" "system" fn WaitForSingleObject(handle: isize, milliseconds: u32) -> u32); | 
|  | 16 | +link!("kernel32.dll""system" fn CloseHandle(handle: isize) -> i32); | 
|  | 17 | +link!("ole32.dll" "system" fn CoCreateGuid(guid: *mut GUID) -> HRESULT); | 
|  | 18 | +link!("ole32.dll" "system" fn CoTaskMemAlloc(len: usize) -> *mut c_void); | 
|  | 19 | +link!("ole32.dll" "system" fn CoTaskMemFree(ptr: *const c_void) -> ()); | 
| 22 | 20 | link!("ole32.dll" "system" fn RoGetAgileReference(options: i32, iid: &GUID, object: *const c_void, reference: *mut *mut c_void) -> HRESULT); | 
|  | 21 | +link!("oleaut32.dll" "system" fn GetErrorInfo(reserved: u32, info: *mut *mut c_void) -> HRESULT); | 
|  | 22 | +link!("oleaut32.dll" "system" fn SetErrorInfo(reserved: u32, info: *const c_void) -> HRESULT); | 
|  | 23 | +link!("oleaut32.dll" "system" fn SysAllocStringLen(input: *const u16, len: u32) -> *const u16); | 
|  | 24 | +link!("oleaut32.dll" "system" fn SysFreeString(bstr: *const u16) -> ()); | 
|  | 25 | +link!("oleaut32.dll" "system" fn SysStringLen(bstr: *const u16) -> u32); | 
| 23 | 26 | 
 | 
| 24 | 27 | pub const FORMAT_MESSAGE_ALLOCATE_BUFFER: u32 = 256; | 
| 25 | 28 | pub const FORMAT_MESSAGE_FROM_SYSTEM: u32 = 4096; | 
|  | 
0 commit comments