Skip to content

Commit

Permalink
sorted bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Dec 3, 2024
1 parent fca2260 commit f892d0a
Show file tree
Hide file tree
Showing 796 changed files with 1,013,231 additions and 1,013,231 deletions.
92 changes: 46 additions & 46 deletions crates/libs/bindgen/src/winmd/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,33 @@
)]

pub type CorElementType = u8;
pub type IMAGE_DIRECTORY_ENTRY = u16;
pub type IMAGE_DLL_CHARACTERISTICS = u16;
pub type IMAGE_FILE_CHARACTERISTICS = u16;
pub type IMAGE_FILE_MACHINE = u16;
pub type IMAGE_OPTIONAL_HEADER_MAGIC = u16;
pub type IMAGE_SECTION_CHARACTERISTICS = u32;
pub type IMAGE_SUBSYSTEM = u16;
pub const ELEMENT_TYPE_ARRAY: CorElementType = 20u8;
pub const ELEMENT_TYPE_BOOLEAN: CorElementType = 2u8;
pub const ELEMENT_TYPE_BYREF: CorElementType = 16u8;
pub const ELEMENT_TYPE_CHAR: CorElementType = 3u8;
pub const ELEMENT_TYPE_CLASS: CorElementType = 18u8;
pub const ELEMENT_TYPE_CMOD_OPT: CorElementType = 32u8;
pub const ELEMENT_TYPE_CMOD_REQD: CorElementType = 31u8;
pub const ELEMENT_TYPE_GENERICINST: CorElementType = 21u8;
pub const ELEMENT_TYPE_I: CorElementType = 24u8;
pub const ELEMENT_TYPE_I1: CorElementType = 4u8;
pub const ELEMENT_TYPE_I2: CorElementType = 6u8;
pub const ELEMENT_TYPE_I4: CorElementType = 8u8;
pub const ELEMENT_TYPE_I8: CorElementType = 10u8;
pub const ELEMENT_TYPE_OBJECT: CorElementType = 28u8;
pub const ELEMENT_TYPE_PTR: CorElementType = 15u8;
pub const ELEMENT_TYPE_R4: CorElementType = 12u8;
pub const ELEMENT_TYPE_R8: CorElementType = 13u8;
pub const ELEMENT_TYPE_STRING: CorElementType = 14u8;
pub const ELEMENT_TYPE_SZARRAY: CorElementType = 29u8;
pub const ELEMENT_TYPE_U: CorElementType = 25u8;
pub const ELEMENT_TYPE_U1: CorElementType = 5u8;
pub const ELEMENT_TYPE_U2: CorElementType = 7u8;
pub const ELEMENT_TYPE_U4: CorElementType = 9u8;
pub const ELEMENT_TYPE_U8: CorElementType = 11u8;
pub const ELEMENT_TYPE_VALUETYPE: CorElementType = 17u8;
pub const ELEMENT_TYPE_VAR: CorElementType = 19u8;
pub const ELEMENT_TYPE_VOID: CorElementType = 1u8;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct IMAGE_COR20_HEADER {
Expand Down Expand Up @@ -42,6 +62,12 @@ pub struct IMAGE_DATA_DIRECTORY {
pub VirtualAddress: u32,
pub Size: u32,
}
pub type IMAGE_DIRECTORY_ENTRY = u16;
pub const IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR: IMAGE_DIRECTORY_ENTRY = 14u16;
pub const IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE: IMAGE_DLL_CHARACTERISTICS = 64u16;
pub const IMAGE_DLLCHARACTERISTICS_NO_SEH: IMAGE_DLL_CHARACTERISTICS = 1024u16;
pub const IMAGE_DLLCHARACTERISTICS_NX_COMPAT: IMAGE_DLL_CHARACTERISTICS = 256u16;
pub type IMAGE_DLL_CHARACTERISTICS = u16;
#[repr(C, packed(2))]
#[derive(Clone, Copy)]
pub struct IMAGE_DOS_HEADER {
Expand All @@ -65,6 +91,11 @@ pub struct IMAGE_DOS_HEADER {
pub e_res2: [u16; 10],
pub e_lfanew: i32,
}
pub const IMAGE_DOS_SIGNATURE: u16 = 23117u16;
pub const IMAGE_FILE_32BIT_MACHINE: IMAGE_FILE_CHARACTERISTICS = 256u16;
pub type IMAGE_FILE_CHARACTERISTICS = u16;
pub const IMAGE_FILE_DLL: IMAGE_FILE_CHARACTERISTICS = 8192u16;
pub const IMAGE_FILE_EXECUTABLE_IMAGE: IMAGE_FILE_CHARACTERISTICS = 2u16;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct IMAGE_FILE_HEADER {
Expand All @@ -76,6 +107,11 @@ pub struct IMAGE_FILE_HEADER {
pub SizeOfOptionalHeader: u16,
pub Characteristics: IMAGE_FILE_CHARACTERISTICS,
}
pub type IMAGE_FILE_MACHINE = u16;
pub const IMAGE_FILE_MACHINE_I386: IMAGE_FILE_MACHINE = 332u16;
pub const IMAGE_NT_OPTIONAL_HDR32_MAGIC: IMAGE_OPTIONAL_HEADER_MAGIC = 267u16;
pub const IMAGE_NT_OPTIONAL_HDR64_MAGIC: IMAGE_OPTIONAL_HEADER_MAGIC = 523u16;
pub const IMAGE_NT_SIGNATURE: u32 = 17744u32;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct IMAGE_OPTIONAL_HEADER32 {
Expand Down Expand Up @@ -145,6 +181,8 @@ pub struct IMAGE_OPTIONAL_HEADER64 {
pub NumberOfRvaAndSizes: u32,
pub DataDirectory: [IMAGE_DATA_DIRECTORY; 16],
}
pub type IMAGE_OPTIONAL_HEADER_MAGIC = u16;
pub type IMAGE_SECTION_CHARACTERISTICS = u32;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct IMAGE_SECTION_HEADER {
Expand All @@ -165,43 +203,5 @@ pub union IMAGE_SECTION_HEADER_0 {
pub PhysicalAddress: u32,
pub VirtualSize: u32,
}
pub const ELEMENT_TYPE_ARRAY: CorElementType = 20u8;
pub const ELEMENT_TYPE_BOOLEAN: CorElementType = 2u8;
pub const ELEMENT_TYPE_BYREF: CorElementType = 16u8;
pub const ELEMENT_TYPE_CHAR: CorElementType = 3u8;
pub const ELEMENT_TYPE_CLASS: CorElementType = 18u8;
pub const ELEMENT_TYPE_CMOD_OPT: CorElementType = 32u8;
pub const ELEMENT_TYPE_CMOD_REQD: CorElementType = 31u8;
pub const ELEMENT_TYPE_GENERICINST: CorElementType = 21u8;
pub const ELEMENT_TYPE_I: CorElementType = 24u8;
pub const ELEMENT_TYPE_I1: CorElementType = 4u8;
pub const ELEMENT_TYPE_I2: CorElementType = 6u8;
pub const ELEMENT_TYPE_I4: CorElementType = 8u8;
pub const ELEMENT_TYPE_I8: CorElementType = 10u8;
pub const ELEMENT_TYPE_OBJECT: CorElementType = 28u8;
pub const ELEMENT_TYPE_PTR: CorElementType = 15u8;
pub const ELEMENT_TYPE_R4: CorElementType = 12u8;
pub const ELEMENT_TYPE_R8: CorElementType = 13u8;
pub const ELEMENT_TYPE_STRING: CorElementType = 14u8;
pub const ELEMENT_TYPE_SZARRAY: CorElementType = 29u8;
pub const ELEMENT_TYPE_U: CorElementType = 25u8;
pub const ELEMENT_TYPE_U1: CorElementType = 5u8;
pub const ELEMENT_TYPE_U2: CorElementType = 7u8;
pub const ELEMENT_TYPE_U4: CorElementType = 9u8;
pub const ELEMENT_TYPE_U8: CorElementType = 11u8;
pub const ELEMENT_TYPE_VALUETYPE: CorElementType = 17u8;
pub const ELEMENT_TYPE_VAR: CorElementType = 19u8;
pub const ELEMENT_TYPE_VOID: CorElementType = 1u8;
pub const IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR: IMAGE_DIRECTORY_ENTRY = 14u16;
pub const IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE: IMAGE_DLL_CHARACTERISTICS = 64u16;
pub const IMAGE_DLLCHARACTERISTICS_NO_SEH: IMAGE_DLL_CHARACTERISTICS = 1024u16;
pub const IMAGE_DLLCHARACTERISTICS_NX_COMPAT: IMAGE_DLL_CHARACTERISTICS = 256u16;
pub const IMAGE_DOS_SIGNATURE: u16 = 23117u16;
pub const IMAGE_FILE_32BIT_MACHINE: IMAGE_FILE_CHARACTERISTICS = 256u16;
pub const IMAGE_FILE_DLL: IMAGE_FILE_CHARACTERISTICS = 8192u16;
pub const IMAGE_FILE_EXECUTABLE_IMAGE: IMAGE_FILE_CHARACTERISTICS = 2u16;
pub const IMAGE_FILE_MACHINE_I386: IMAGE_FILE_MACHINE = 332u16;
pub const IMAGE_NT_OPTIONAL_HDR32_MAGIC: IMAGE_OPTIONAL_HEADER_MAGIC = 267u16;
pub const IMAGE_NT_OPTIONAL_HDR64_MAGIC: IMAGE_OPTIONAL_HEADER_MAGIC = 523u16;
pub const IMAGE_NT_SIGNATURE: u32 = 17744u32;
pub type IMAGE_SUBSYSTEM = u16;
pub const IMAGE_SUBSYSTEM_WINDOWS_CUI: IMAGE_SUBSYSTEM = 3u16;
34 changes: 17 additions & 17 deletions crates/libs/core/src/imp/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,9 @@ windows_targets::link!("kernel32.dll" "system" fn LoadLibraryExA(lplibfilename :
windows_targets::link!("api-ms-win-core-winrt-l1-1-0.dll" "system" fn RoGetActivationFactory(activatableclassid : HSTRING, iid : *const GUID, factory : *mut *mut core::ffi::c_void) -> HRESULT);
windows_targets::link!("kernel32.dll" "system" fn SetEvent(hevent : HANDLE) -> BOOL);
windows_targets::link!("kernel32.dll" "system" fn WaitForSingleObject(hhandle : HANDLE, dwmilliseconds : u32) -> WAIT_EVENT);
pub type FARPROC = Option<unsafe extern "system" fn() -> isize>;
pub type LOAD_LIBRARY_FLAGS = u32;
pub type WAIT_EVENT = u32;
pub type BOOL = i32;
pub type CO_MTA_USAGE_COOKIE = *mut core::ffi::c_void;
pub type HANDLE = *mut core::ffi::c_void;
pub type HINSTANCE = *mut core::ffi::c_void;
pub type HMODULE = *mut core::ffi::c_void;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct SECURITY_ATTRIBUTES {
pub nLength: u32,
pub lpSecurityDescriptor: *mut core::ffi::c_void,
pub bInheritHandle: BOOL,
}
pub const LOAD_LIBRARY_SEARCH_DEFAULT_DIRS: LOAD_LIBRARY_FLAGS = 4096u32;
pub type HSTRING = *mut core::ffi::c_void;
pub type PCSTR = *const u8;
pub type PCWSTR = *const u16;
pub type FARPROC = Option<unsafe extern "system" fn() -> isize>;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct GUID {
Expand All @@ -55,4 +39,20 @@ impl GUID {
}
}
}
pub type HANDLE = *mut core::ffi::c_void;
pub type HINSTANCE = *mut core::ffi::c_void;
pub type HMODULE = *mut core::ffi::c_void;
pub type HRESULT = i32;
pub type LOAD_LIBRARY_FLAGS = u32;
pub const LOAD_LIBRARY_SEARCH_DEFAULT_DIRS: LOAD_LIBRARY_FLAGS = 4096u32;
pub type PCSTR = *const u8;
pub type PCWSTR = *const u16;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct SECURITY_ATTRIBUTES {
pub nLength: u32,
pub lpSecurityDescriptor: *mut core::ffi::c_void,
pub bInheritHandle: BOOL,
}
pub type HSTRING = *mut core::ffi::c_void;
pub type WAIT_EVENT = u32;
18 changes: 9 additions & 9 deletions crates/libs/core/src/imp/com_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ where
)
.and_then(|| windows_core::Type::from_abi(result__))
}
pub const AGILEREFERENCE_DEFAULT: AgileReferenceOptions = AgileReferenceOptions(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AgileReferenceOptions(pub i32);
pub const CO_E_NOTINITIALIZED: windows_core::HRESULT = windows_core::HRESULT(0x800401F0_u32 as _);
pub const E_BOUNDS: windows_core::HRESULT = windows_core::HRESULT(0x8000000B_u32 as _);
pub const E_INVALIDARG: windows_core::HRESULT = windows_core::HRESULT(0x80070057_u32 as _);
pub const E_NOINTERFACE: windows_core::HRESULT = windows_core::HRESULT(0x80004002_u32 as _);
pub const E_POINTER: windows_core::HRESULT = windows_core::HRESULT(0x80004003_u32 as _);
windows_core::imp::define_interface!(
IAgileObject,
IAgileObject_Vtbl,
Expand Down Expand Up @@ -230,15 +239,6 @@ impl IWeakReferenceSource_Vtbl {
}
}
impl windows_core::RuntimeName for IWeakReferenceSource {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AgileReferenceOptions(pub i32);
pub const AGILEREFERENCE_DEFAULT: AgileReferenceOptions = AgileReferenceOptions(0i32);
pub const CO_E_NOTINITIALIZED: windows_core::HRESULT = windows_core::HRESULT(0x800401F0_u32 as _);
pub const E_BOUNDS: windows_core::HRESULT = windows_core::HRESULT(0x8000000B_u32 as _);
pub const E_INVALIDARG: windows_core::HRESULT = windows_core::HRESULT(0x80070057_u32 as _);
pub const E_NOINTERFACE: windows_core::HRESULT = windows_core::HRESULT(0x80004002_u32 as _);
pub const E_POINTER: windows_core::HRESULT = windows_core::HRESULT(0x80004003_u32 as _);
pub const JSCRIPT_E_CANTEXECUTE: windows_core::HRESULT = windows_core::HRESULT(0x89020001_u32 as _);
pub const RPC_E_DISCONNECTED: windows_core::HRESULT = windows_core::HRESULT(0x80010108_u32 as _);
pub const TYPE_E_TYPEMISMATCH: windows_core::HRESULT = windows_core::HRESULT(0x80028CA0_u32 as _);
34 changes: 17 additions & 17 deletions crates/libs/registry/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,43 @@ windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyExW(hkey : HKEY, lps
windows_targets::link!("advapi32.dll" "system" fn RegQueryInfoKeyW(hkey : HKEY, lpclass : PWSTR, lpcchclass : *mut u32, lpreserved : *const u32, lpcsubkeys : *mut u32, lpcbmaxsubkeylen : *mut u32, lpcbmaxclasslen : *mut u32, lpcvalues : *mut u32, lpcbmaxvaluenamelen : *mut u32, lpcbmaxvaluelen : *mut u32, lpcbsecuritydescriptor : *mut u32, lpftlastwritetime : *mut FILETIME) -> WIN32_ERROR);
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);
windows_targets::link!("advapi32.dll" "system" fn RegSetValueExW(hkey : HKEY, lpvaluename : PCWSTR, reserved : u32, dwtype : REG_VALUE_TYPE, lpdata : *const u8, cbdata : u32) -> WIN32_ERROR);
pub type HEAP_FLAGS = u32;
pub type REG_CREATE_KEY_DISPOSITION = u32;
pub type REG_OPEN_CREATE_OPTIONS = u32;
pub type REG_SAM_FLAGS = u32;
pub type REG_VALUE_TYPE = u32;
pub type WIN32_ERROR = u32;
pub type BOOL = i32;
pub const ERROR_INVALID_DATA: WIN32_ERROR = 13u32;
pub const ERROR_NO_MORE_ITEMS: WIN32_ERROR = 259u32;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct FILETIME {
pub dwLowDateTime: u32,
pub dwHighDateTime: u32,
}
pub type HANDLE = *mut core::ffi::c_void;
pub type HEAP_FLAGS = u32;
pub type HKEY = *mut core::ffi::c_void;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct SECURITY_ATTRIBUTES {
pub nLength: u32,
pub lpSecurityDescriptor: *mut core::ffi::c_void,
pub bInheritHandle: BOOL,
}
pub const ERROR_INVALID_DATA: WIN32_ERROR = 13u32;
pub const ERROR_NO_MORE_ITEMS: WIN32_ERROR = 259u32;
pub const HKEY_CLASSES_ROOT: HKEY = -2147483648i32 as _;
pub const HKEY_CURRENT_CONFIG: HKEY = -2147483643i32 as _;
pub const HKEY_CURRENT_USER: HKEY = -2147483647i32 as _;
pub const HKEY_LOCAL_MACHINE: HKEY = -2147483646i32 as _;
pub const HKEY_USERS: HKEY = -2147483645i32 as _;
pub const KEY_READ: REG_SAM_FLAGS = 131097u32;
pub const KEY_WRITE: REG_SAM_FLAGS = 131078u32;
pub type PCWSTR = *const u16;
pub type PWSTR = *mut u16;
pub const REG_BINARY: REG_VALUE_TYPE = 3u32;
pub type REG_CREATE_KEY_DISPOSITION = u32;
pub const REG_DWORD: REG_VALUE_TYPE = 4u32;
pub const REG_EXPAND_SZ: REG_VALUE_TYPE = 2u32;
pub const REG_MULTI_SZ: REG_VALUE_TYPE = 7u32;
pub type REG_OPEN_CREATE_OPTIONS = u32;
pub const REG_OPTION_NON_VOLATILE: REG_OPEN_CREATE_OPTIONS = 0u32;
pub const REG_QWORD: REG_VALUE_TYPE = 11u32;
pub type REG_SAM_FLAGS = u32;
pub const REG_SZ: REG_VALUE_TYPE = 1u32;
pub type PWSTR = *mut u16;
pub type PCWSTR = *const u16;
pub type REG_VALUE_TYPE = u32;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct SECURITY_ATTRIBUTES {
pub nLength: u32,
pub lpSecurityDescriptor: *mut core::ffi::c_void,
pub bInheritHandle: BOOL,
}
pub type WIN32_ERROR = u32;
70 changes: 35 additions & 35 deletions crates/libs/result/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,16 @@ windows_targets::link!("api-ms-win-core-winrt-error-l1-1-0.dll" "system" fn RoOr
windows_targets::link!("oleaut32.dll" "system" fn SetErrorInfo(dwreserved : u32, perrinfo : * mut core::ffi::c_void) -> HRESULT);
windows_targets::link!("oleaut32.dll" "system" fn SysFreeString(bstrstring : BSTR));
windows_targets::link!("oleaut32.dll" "system" fn SysStringLen(pbstr : BSTR) -> u32);
pub const IID_IErrorInfo: GUID = GUID::from_u128(0x1cf2b120_547d_101b_8e65_08002b2bd119);
#[repr(C)]
pub struct IErrorInfo_Vtbl {
pub base__: IUnknown_Vtbl,
pub GetGUID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GUID) -> HRESULT,
pub GetSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut BSTR) -> HRESULT,
pub GetDescription: unsafe extern "system" fn(*mut core::ffi::c_void, *mut BSTR) -> HRESULT,
pub GetHelpFile: unsafe extern "system" fn(*mut core::ffi::c_void, *mut BSTR) -> HRESULT,
pub GetHelpContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> HRESULT,
}
pub const IID_IRestrictedErrorInfo: GUID = GUID::from_u128(0x82ba7092_4c88_427d_a7bc_16dd93feb67e);
#[repr(C)]
pub struct IRestrictedErrorInfo_Vtbl {
pub base__: IUnknown_Vtbl,
pub GetErrorDetails: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut BSTR,
*mut HRESULT,
*mut BSTR,
*mut BSTR,
) -> HRESULT,
pub GetReference: unsafe extern "system" fn(*mut core::ffi::c_void, *mut BSTR) -> HRESULT,
}
pub type FORMAT_MESSAGE_OPTIONS = u32;
pub type HEAP_FLAGS = u32;
pub type LOAD_LIBRARY_FLAGS = u32;
pub type WIN32_ERROR = u32;
pub type BOOL = i32;
pub type HANDLE = *mut core::ffi::c_void;
pub type HINSTANCE = *mut core::ffi::c_void;
pub type HMODULE = *mut core::ffi::c_void;
pub type BSTR = *const u16;
pub const ERROR_INVALID_DATA: WIN32_ERROR = 13u32;
pub const ERROR_NO_UNICODE_TRANSLATION: WIN32_ERROR = 1113u32;
pub const E_UNEXPECTED: HRESULT = 0x8000FFFF_u32 as _;
pub const FORMAT_MESSAGE_ALLOCATE_BUFFER: FORMAT_MESSAGE_OPTIONS = 256u32;
pub const FORMAT_MESSAGE_FROM_HMODULE: FORMAT_MESSAGE_OPTIONS = 2048u32;
pub const FORMAT_MESSAGE_FROM_SYSTEM: FORMAT_MESSAGE_OPTIONS = 4096u32;
pub const FORMAT_MESSAGE_IGNORE_INSERTS: FORMAT_MESSAGE_OPTIONS = 512u32;
pub const LOAD_LIBRARY_SEARCH_DEFAULT_DIRS: LOAD_LIBRARY_FLAGS = 4096u32;
pub type PCSTR = *const u8;
pub type PWSTR = *mut u16;
pub type PCWSTR = *const u16;
pub type FORMAT_MESSAGE_OPTIONS = u32;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct GUID {
Expand All @@ -76,7 +44,34 @@ impl GUID {
}
}
}
pub type HANDLE = *mut core::ffi::c_void;
pub type HEAP_FLAGS = u32;
pub type HINSTANCE = *mut core::ffi::c_void;
pub type HMODULE = *mut core::ffi::c_void;
pub type HRESULT = i32;
pub const IID_IErrorInfo: GUID = GUID::from_u128(0x1cf2b120_547d_101b_8e65_08002b2bd119);
#[repr(C)]
pub struct IErrorInfo_Vtbl {
pub base__: IUnknown_Vtbl,
pub GetGUID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GUID) -> HRESULT,
pub GetSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut BSTR) -> HRESULT,
pub GetDescription: unsafe extern "system" fn(*mut core::ffi::c_void, *mut BSTR) -> HRESULT,
pub GetHelpFile: unsafe extern "system" fn(*mut core::ffi::c_void, *mut BSTR) -> HRESULT,
pub GetHelpContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> HRESULT,
}
pub const IID_IRestrictedErrorInfo: GUID = GUID::from_u128(0x82ba7092_4c88_427d_a7bc_16dd93feb67e);
#[repr(C)]
pub struct IRestrictedErrorInfo_Vtbl {
pub base__: IUnknown_Vtbl,
pub GetErrorDetails: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut BSTR,
*mut HRESULT,
*mut BSTR,
*mut BSTR,
) -> HRESULT,
pub GetReference: unsafe extern "system" fn(*mut core::ffi::c_void, *mut BSTR) -> HRESULT,
}
pub const IID_IUnknown: GUID = GUID::from_u128(0x00000000_0000_0000_c000_000000000046);
#[repr(C)]
pub struct IUnknown_Vtbl {
Expand All @@ -88,4 +83,9 @@ pub struct IUnknown_Vtbl {
pub AddRef: unsafe extern "system" fn(this: *mut core::ffi::c_void) -> u32,
pub Release: unsafe extern "system" fn(this: *mut core::ffi::c_void) -> u32,
}
pub type BSTR = *const u16;
pub type LOAD_LIBRARY_FLAGS = u32;
pub const LOAD_LIBRARY_SEARCH_DEFAULT_DIRS: LOAD_LIBRARY_FLAGS = 4096u32;
pub type PCSTR = *const u8;
pub type PCWSTR = *const u16;
pub type PWSTR = *mut u16;
pub type WIN32_ERROR = u32;
4 changes: 2 additions & 2 deletions crates/libs/strings/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ windows_targets::link!("kernel32.dll" "system" fn HeapFree(hheap : HANDLE, dwfla
windows_targets::link!("oleaut32.dll" "system" fn SysAllocStringLen(strin : PCWSTR, ui : u32) -> BSTR);
windows_targets::link!("oleaut32.dll" "system" fn SysFreeString(bstrstring : BSTR));
windows_targets::link!("oleaut32.dll" "system" fn SysStringLen(pbstr : BSTR) -> u32);
pub type HEAP_FLAGS = u32;
pub type BOOL = i32;
pub type BSTR = *const u16;
pub type HANDLE = *mut core::ffi::c_void;
pub type HEAP_FLAGS = u32;
pub type PCWSTR = *const u16;
pub type BSTR = *const u16;
Loading

0 comments on commit f892d0a

Please sign in to comment.