|
6 | 6 | // cd generate-windows-sys/ |
7 | 7 | // cargo run |
8 | 8 | // ``` |
9 | | -// Bindings generated by `windows-bindgen` 0.57.0 |
| 9 | +// Bindings generated by `windows-bindgen` 0.58.0 |
10 | 10 |
|
11 | 11 | #![allow( |
12 | 12 | non_snake_case, |
|
15 | 15 | dead_code, |
16 | 16 | clippy::all |
17 | 17 | )] |
18 | | -#[link(name = "advapi32")] |
19 | | -extern "system" { |
20 | | - pub fn RegCloseKey(hkey: HKEY) -> WIN32_ERROR; |
21 | | -} |
22 | | -#[link(name = "advapi32")] |
23 | | -extern "system" { |
24 | | - pub fn RegEnumKeyExW( |
25 | | - hkey: HKEY, |
26 | | - dwindex: u32, |
27 | | - lpname: PWSTR, |
28 | | - lpcchname: *mut u32, |
29 | | - lpreserved: *const u32, |
30 | | - lpclass: PWSTR, |
31 | | - lpcchclass: *mut u32, |
32 | | - lpftlastwritetime: *mut FILETIME, |
33 | | - ) -> WIN32_ERROR; |
34 | | -} |
35 | | -#[link(name = "advapi32")] |
36 | | -extern "system" { |
37 | | - pub fn RegOpenKeyExW( |
38 | | - hkey: HKEY, |
39 | | - lpsubkey: PCWSTR, |
40 | | - uloptions: u32, |
41 | | - samdesired: REG_SAM_FLAGS, |
42 | | - phkresult: *mut HKEY, |
43 | | - ) -> WIN32_ERROR; |
44 | | -} |
45 | | -#[link(name = "advapi32")] |
46 | | -extern "system" { |
47 | | - pub fn RegQueryValueExW( |
48 | | - hkey: HKEY, |
49 | | - lpvaluename: PCWSTR, |
50 | | - lpreserved: *const u32, |
51 | | - lptype: *mut REG_VALUE_TYPE, |
52 | | - lpdata: *mut u8, |
53 | | - lpcbdata: *mut u32, |
54 | | - ) -> WIN32_ERROR; |
55 | | -} |
56 | | -#[link(name = "kernel32")] |
57 | | -extern "system" { |
58 | | - pub fn FreeLibrary(hlibmodule: HMODULE) -> BOOL; |
59 | | -} |
60 | | -#[link(name = "kernel32")] |
61 | | -extern "system" { |
62 | | - pub fn GetMachineTypeAttributes( |
63 | | - machine: u16, |
64 | | - machinetypeattributes: *mut MACHINE_ATTRIBUTES, |
65 | | - ) -> HRESULT; |
66 | | -} |
67 | | -#[link(name = "kernel32")] |
68 | | -extern "system" { |
69 | | - pub fn GetProcAddress(hmodule: HMODULE, lpprocname: PCSTR) -> FARPROC; |
70 | | -} |
71 | | -#[link(name = "kernel32")] |
72 | | -extern "system" { |
73 | | - pub fn LoadLibraryA(lplibfilename: PCSTR) -> HMODULE; |
74 | | -} |
75 | | -#[link(name = "kernel32")] |
76 | | -extern "system" { |
77 | | - pub fn OpenSemaphoreA(dwdesiredaccess: u32, binherithandle: BOOL, lpname: PCSTR) -> HANDLE; |
78 | | -} |
79 | | -#[link(name = "kernel32")] |
80 | | -extern "system" { |
81 | | - pub fn PeekNamedPipe( |
82 | | - hnamedpipe: HANDLE, |
83 | | - lpbuffer: *mut core::ffi::c_void, |
84 | | - nbuffersize: u32, |
85 | | - lpbytesread: *mut u32, |
86 | | - lptotalbytesavail: *mut u32, |
87 | | - lpbytesleftthismessage: *mut u32, |
88 | | - ) -> BOOL; |
89 | | -} |
90 | | -#[link(name = "kernel32")] |
91 | | -extern "system" { |
92 | | - pub fn ReleaseSemaphore( |
93 | | - hsemaphore: HANDLE, |
94 | | - lreleasecount: i32, |
95 | | - lppreviouscount: *mut i32, |
96 | | - ) -> BOOL; |
97 | | -} |
98 | | -#[link(name = "kernel32")] |
99 | | -extern "system" { |
100 | | - pub fn WaitForSingleObject(hhandle: HANDLE, dwmilliseconds: u32) -> WAIT_EVENT; |
101 | | -} |
102 | | -#[link(name = "ole32")] |
103 | | -extern "system" { |
104 | | - pub fn CoCreateInstance( |
105 | | - rclsid: *const GUID, |
106 | | - punkouter: *mut core::ffi::c_void, |
107 | | - dwclscontext: CLSCTX, |
108 | | - riid: *const GUID, |
109 | | - ppv: *mut *mut core::ffi::c_void, |
110 | | - ) -> HRESULT; |
111 | | -} |
112 | | -#[link(name = "ole32")] |
113 | | -extern "system" { |
114 | | - pub fn CoInitializeEx(pvreserved: *const core::ffi::c_void, dwcoinit: u32) -> HRESULT; |
115 | | -} |
116 | | -#[link(name = "oleaut32")] |
117 | | -extern "system" { |
118 | | - pub fn SysFreeString(bstrstring: BSTR); |
119 | | -} |
120 | | -#[link(name = "oleaut32")] |
121 | | -extern "system" { |
122 | | - pub fn SysStringLen(pbstr: BSTR) -> u32; |
123 | | -} |
| 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); |
| 22 | +windows_targets::link!("kernel32.dll" "system" fn FreeLibrary(hlibmodule : HMODULE) -> BOOL); |
| 23 | +windows_targets::link!("kernel32.dll" "system" fn GetMachineTypeAttributes(machine : u16, machinetypeattributes : *mut MACHINE_ATTRIBUTES) -> HRESULT); |
| 24 | +windows_targets::link!("kernel32.dll" "system" fn GetProcAddress(hmodule : HMODULE, lpprocname : PCSTR) -> FARPROC); |
| 25 | +windows_targets::link!("kernel32.dll" "system" fn LoadLibraryA(lplibfilename : PCSTR) -> HMODULE); |
| 26 | +windows_targets::link!("kernel32.dll" "system" fn OpenSemaphoreA(dwdesiredaccess : u32, binherithandle : BOOL, lpname : PCSTR) -> HANDLE); |
| 27 | +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); |
| 28 | +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 | +windows_targets::link!("oleaut32.dll" "system" fn SysFreeString(bstrstring : BSTR)); |
| 33 | +windows_targets::link!("oleaut32.dll" "system" fn SysStringLen(pbstr : BSTR) -> u32); |
124 | 34 | pub type ADVANCED_FEATURE_FLAGS = u16; |
125 | 35 | pub type BOOL = i32; |
126 | 36 | pub type BSTR = *const u16; |
@@ -203,3 +113,9 @@ pub const WAIT_FAILED: WAIT_EVENT = 4294967295u32; |
203 | 113 | pub const WAIT_OBJECT_0: WAIT_EVENT = 0u32; |
204 | 114 | pub const WAIT_TIMEOUT: WAIT_EVENT = 258u32; |
205 | 115 | pub type WIN32_ERROR = u32; |
| 116 | + |
| 117 | +#[link(name = "advapi32")] |
| 118 | +#[link(name = "ole32")] |
| 119 | +#[link(name = "oleaut32")] |
| 120 | +extern "C" {} |
| 121 | +use super::windows_targets; |
0 commit comments