|
6 | 6 | // cd generate-windows-sys/ |
7 | 7 | // cargo run |
8 | 8 | // ``` |
9 | | -// Bindings generated by `windows-bindgen` 0.58.0 |
| 9 | +// Bindings generated by `windows-bindgen` 0.59.0 |
10 | 10 |
|
11 | 11 | #![allow( |
12 | 12 | non_snake_case, |
|
15 | 15 | dead_code, |
16 | 16 | clippy::all |
17 | 17 | )] |
18 | | -windows_targets::link!("advapi32.dll" "system" fn RegCloseKey(hkey : HKEY) -> WIN32_ERROR); |
19 | | -windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyExW(hkey : HKEY, dwindex : u32, lpname : PWSTR, lpcchname : *mut u32, lpreserved : *const u32, lpclass : PWSTR, lpcchclass : *mut u32, lpftlastwritetime : *mut FILETIME) -> WIN32_ERROR); |
20 | | -windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyExW(hkey : HKEY, lpsubkey : PCWSTR, uloptions : u32, samdesired : REG_SAM_FLAGS, phkresult : *mut HKEY) -> WIN32_ERROR); |
21 | | -windows_targets::link!("advapi32.dll" "system" fn RegQueryValueExW(hkey : HKEY, lpvaluename : PCWSTR, lpreserved : *const u32, lptype : *mut REG_VALUE_TYPE, lpdata : *mut u8, lpcbdata : *mut u32) -> WIN32_ERROR); |
| 18 | + |
| 19 | +windows_targets::link!("ole32.dll" "system" fn CoCreateInstance(rclsid : *const GUID, punkouter : * mut core::ffi::c_void, dwclscontext : CLSCTX, riid : *const GUID, ppv : *mut *mut core::ffi::c_void) -> HRESULT); |
| 20 | +windows_targets::link!("ole32.dll" "system" fn CoInitializeEx(pvreserved : *const core::ffi::c_void, dwcoinit : u32) -> HRESULT); |
22 | 21 | windows_targets::link!("kernel32.dll" "system" fn FreeLibrary(hlibmodule : HMODULE) -> BOOL); |
23 | 22 | windows_targets::link!("kernel32.dll" "system" fn GetMachineTypeAttributes(machine : u16, machinetypeattributes : *mut MACHINE_ATTRIBUTES) -> HRESULT); |
24 | 23 | windows_targets::link!("kernel32.dll" "system" fn GetProcAddress(hmodule : HMODULE, lpprocname : PCSTR) -> FARPROC); |
25 | 24 | windows_targets::link!("kernel32.dll" "system" fn LoadLibraryA(lplibfilename : PCSTR) -> HMODULE); |
26 | 25 | windows_targets::link!("kernel32.dll" "system" fn OpenSemaphoreA(dwdesiredaccess : u32, binherithandle : BOOL, lpname : PCSTR) -> HANDLE); |
27 | 26 | windows_targets::link!("kernel32.dll" "system" fn PeekNamedPipe(hnamedpipe : HANDLE, lpbuffer : *mut core::ffi::c_void, nbuffersize : u32, lpbytesread : *mut u32, lptotalbytesavail : *mut u32, lpbytesleftthismessage : *mut u32) -> BOOL); |
| 27 | +windows_targets::link!("advapi32.dll" "system" fn RegCloseKey(hkey : HKEY) -> WIN32_ERROR); |
| 28 | +windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyExW(hkey : HKEY, dwindex : u32, lpname : PWSTR, lpcchname : *mut u32, lpreserved : *const u32, lpclass : PWSTR, lpcchclass : *mut u32, lpftlastwritetime : *mut FILETIME) -> WIN32_ERROR); |
| 29 | +windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyExW(hkey : HKEY, lpsubkey : PCWSTR, uloptions : u32, samdesired : REG_SAM_FLAGS, phkresult : *mut HKEY) -> WIN32_ERROR); |
| 30 | +windows_targets::link!("advapi32.dll" "system" fn RegQueryValueExW(hkey : HKEY, lpvaluename : PCWSTR, lpreserved : *const u32, lptype : *mut REG_VALUE_TYPE, lpdata : *mut u8, lpcbdata : *mut u32) -> WIN32_ERROR); |
28 | 31 | windows_targets::link!("kernel32.dll" "system" fn ReleaseSemaphore(hsemaphore : HANDLE, lreleasecount : i32, lppreviouscount : *mut i32) -> BOOL); |
29 | | -windows_targets::link!("kernel32.dll" "system" fn WaitForSingleObject(hhandle : HANDLE, dwmilliseconds : u32) -> WAIT_EVENT); |
30 | | -windows_targets::link!("ole32.dll" "system" fn CoCreateInstance(rclsid : *const GUID, punkouter : * mut core::ffi::c_void, dwclscontext : CLSCTX, riid : *const GUID, ppv : *mut *mut core::ffi::c_void) -> HRESULT); |
31 | | -windows_targets::link!("ole32.dll" "system" fn CoInitializeEx(pvreserved : *const core::ffi::c_void, dwcoinit : u32) -> HRESULT); |
32 | 32 | windows_targets::link!("oleaut32.dll" "system" fn SysFreeString(bstrstring : BSTR)); |
33 | 33 | windows_targets::link!("oleaut32.dll" "system" fn SysStringLen(pbstr : BSTR) -> u32); |
| 34 | +windows_targets::link!("kernel32.dll" "system" fn WaitForSingleObject(hhandle : HANDLE, dwmilliseconds : u32) -> WAIT_EVENT); |
34 | 35 | pub type ADVANCED_FEATURE_FLAGS = u16; |
35 | 36 | pub type BOOL = i32; |
36 | 37 | pub type BSTR = *const u16; |
@@ -69,12 +70,24 @@ impl GUID { |
69 | 70 | } |
70 | 71 | } |
71 | 72 | pub type HANDLE = *mut core::ffi::c_void; |
| 73 | +pub type HINSTANCE = *mut core::ffi::c_void; |
72 | 74 | pub type HKEY = *mut core::ffi::c_void; |
73 | 75 | pub const HKEY_LOCAL_MACHINE: HKEY = -2147483646i32 as _; |
74 | 76 | pub type HMODULE = *mut core::ffi::c_void; |
75 | 77 | pub type HRESULT = i32; |
76 | 78 | pub type IMAGE_FILE_MACHINE = u16; |
77 | 79 | pub const IMAGE_FILE_MACHINE_AMD64: IMAGE_FILE_MACHINE = 34404u16; |
| 80 | +pub const IID_IUnknown: GUID = GUID::from_u128(0x00000000_0000_0000_c000_000000000046); |
| 81 | +#[repr(C)] |
| 82 | +pub struct IUnknown_Vtbl { |
| 83 | + pub QueryInterface: unsafe extern "system" fn( |
| 84 | + this: *mut core::ffi::c_void, |
| 85 | + iid: *const GUID, |
| 86 | + interface: *mut *mut core::ffi::c_void, |
| 87 | + ) -> HRESULT, |
| 88 | + pub AddRef: unsafe extern "system" fn(this: *mut core::ffi::c_void) -> u32, |
| 89 | + pub Release: unsafe extern "system" fn(this: *mut core::ffi::c_void) -> u32, |
| 90 | +} |
78 | 91 | pub const KEY_READ: REG_SAM_FLAGS = 131097u32; |
79 | 92 | pub const KEY_WOW64_32KEY: REG_SAM_FLAGS = 512u32; |
80 | 93 | pub type MACHINE_ATTRIBUTES = i32; |
|
0 commit comments