Skip to content

Commit

Permalink
Update Win32 metadata v47 (#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Mar 28, 2023
1 parent 3e3c87b commit f86349d
Show file tree
Hide file tree
Showing 143 changed files with 194,236 additions and 182,301 deletions.
10 changes: 10 additions & 0 deletions crates/libs/bindgen/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ fn gen_sys_function(gen: &Gen, def: MethodDef) -> TokenStream {
let scope = gen.reader.impl_map_scope(impl_map);
let link = gen.reader.module_ref_name(scope).to_lowercase();

// TODO: skip inline functions for now.
if link == "forceinline" {
return TokenStream::new();
}

let params = signature.params.iter().map(|p| {
let name = gen.param_name(p.def);
let tokens = gen.type_default_name(&p.ty);
Expand Down Expand Up @@ -82,6 +87,11 @@ fn gen_win_function(gen: &Gen, def: MethodDef) -> TokenStream {
let scope = gen.reader.impl_map_scope(impl_map);
let link = gen.reader.module_ref_name(scope).to_lowercase();

// TODO: skip inline functions for now.
if link == "forceinline" {
return TokenStream::new();
}

if gen.namespace.starts_with("Windows.") {
quote! {
::windows::imp::link!(#link #extern_abi fn #name(#(#abi_params),*) #abi_return_type);
Expand Down
Binary file modified crates/libs/metadata/default/Windows.Win32.Interop.winmd
Binary file not shown.
Binary file modified crates/libs/metadata/default/Windows.Win32.winmd
Binary file not shown.
2 changes: 1 addition & 1 deletion crates/libs/metadata/default/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ the `.winmd` files in this folder are licensed via MIT or Apache-2.0.

## Windows.Win32.winmd
- Source: https://www.nuget.org/packages/Microsoft.Windows.SDK.Win32Metadata/
- Version: 46.0.5
- Version: 47.0.26

## Windows.Wdk.winmd
- Source: https://www.nuget.org/packages/Microsoft.Windows.WDK.Win32Metadata/
Expand Down
3 changes: 3 additions & 0 deletions crates/libs/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ Win32_System_Antimalware = ["Win32_System"]
Win32_System_ApplicationInstallationAndServicing = ["Win32_System"]
Win32_System_ApplicationVerifier = ["Win32_System"]
Win32_System_AssessmentTool = ["Win32_System"]
Win32_System_ClrHosting = ["Win32_System"]
Win32_System_Com = ["Win32_System"]
Win32_System_Com_CallObj = ["Win32_System_Com"]
Win32_System_Com_ChannelCredentials = ["Win32_System_Com"]
Expand All @@ -197,6 +198,8 @@ Win32_System_Diagnostics = ["Win32_System"]
Win32_System_Diagnostics_Ceip = ["Win32_System_Diagnostics"]
Win32_System_Diagnostics_ClrProfiling = ["Win32_System_Diagnostics"]
Win32_System_Diagnostics_Debug = ["Win32_System_Diagnostics"]
Win32_System_Diagnostics_Debug_ActiveScript = ["Win32_System_Diagnostics_Debug"]
Win32_System_Diagnostics_Debug_Extensions = ["Win32_System_Diagnostics_Debug"]
Win32_System_Diagnostics_Etw = ["Win32_System_Diagnostics"]
Win32_System_Diagnostics_ProcessSnapshotting = ["Win32_System_Diagnostics"]
Win32_System_Diagnostics_ToolHelp = ["Win32_System_Diagnostics"]
Expand Down
12 changes: 11 additions & 1 deletion crates/libs/sys/src/Windows/Win32/Data/HtmlHelp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ pub const HHACT_TOC_PREV: i32 = 21i32;
#[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`*"]
pub const HHACT_ZOOM: i32 = 19i32;
#[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`*"]
pub const HHN_FIRST: u32 = 4294966436u32;
#[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`*"]
pub const HHN_LAST: u32 = 4294966417u32;
#[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`*"]
pub const HHN_NAVCOMPLETE: u32 = 4294966436u32;
#[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`*"]
pub const HHN_TRACK: u32 = 4294966435u32;
#[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`*"]
pub const HHN_WINDOW_CREATE: u32 = 4294966434u32;
#[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`*"]
pub const HHWIN_BUTTON_BACK: u32 = 4u32;
#[doc = "*Required features: `\"Win32_Data_HtmlHelp\"`*"]
pub const HHWIN_BUTTON_BROWSE_BCK: u32 = 256u32;
Expand Down Expand Up @@ -753,7 +763,7 @@ impl ::core::clone::Clone for HH_GLOBAL_PROPERTY {
#[cfg(feature = "Win32_Foundation")]
pub struct HH_POPUP {
pub cbStruct: i32,
pub hinst: super::super::Foundation::HINSTANCE,
pub hinst: super::super::Foundation::HMODULE,
pub idString: u32,
pub pszText: *mut i8,
pub pt: super::super::Foundation::POINT,
Expand Down
14 changes: 8 additions & 6 deletions crates/libs/sys/src/Windows/Win32/Devices/Bluetooth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothEnumerateInstalledServices ( hradio : super::super::Foundation:: HANDLE , pbtdi : *const BLUETOOTH_DEVICE_INFO , pcserviceinout : *mut u32 , pguidservices : *mut ::windows_sys::core::GUID ) -> u32 );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindDeviceClose ( hfind : isize ) -> super::super::Foundation:: BOOL );
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindDeviceClose ( hfind : HBLUETOOTH_DEVICE_FIND ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindFirstDevice ( pbtsp : *const BLUETOOTH_DEVICE_SEARCH_PARAMS , pbtdi : *mut BLUETOOTH_DEVICE_INFO ) -> isize );
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindFirstDevice ( pbtsp : *const BLUETOOTH_DEVICE_SEARCH_PARAMS , pbtdi : *mut BLUETOOTH_DEVICE_INFO ) -> HBLUETOOTH_DEVICE_FIND );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindFirstRadio ( pbtfrp : *const BLUETOOTH_FIND_RADIO_PARAMS , phradio : *mut super::super::Foundation:: HANDLE ) -> isize );
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindFirstRadio ( pbtfrp : *const BLUETOOTH_FIND_RADIO_PARAMS , phradio : *mut super::super::Foundation:: HANDLE ) -> HBLUETOOTH_RADIO_FIND );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindNextDevice ( hfind : isize , pbtdi : *mut BLUETOOTH_DEVICE_INFO ) -> super::super::Foundation:: BOOL );
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindNextDevice ( hfind : HBLUETOOTH_DEVICE_FIND , pbtdi : *mut BLUETOOTH_DEVICE_INFO ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindNextRadio ( hfind : isize , phradio : *mut super::super::Foundation:: HANDLE ) -> super::super::Foundation:: BOOL );
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindNextRadio ( hfind : HBLUETOOTH_RADIO_FIND , phradio : *mut super::super::Foundation:: HANDLE ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindRadioClose ( hfind : isize ) -> super::super::Foundation:: BOOL );
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothFindRadioClose ( hfind : HBLUETOOTH_RADIO_FIND ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "bluetoothapis.dll""system" #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] fn BluetoothGATTAbortReliableWrite ( hdevice : super::super::Foundation:: HANDLE , reliablewritecontext : u64 , flags : u32 ) -> ::windows_sys::core::HRESULT );
#[cfg(feature = "Win32_Foundation")]
Expand Down Expand Up @@ -2536,6 +2536,8 @@ impl ::core::clone::Clone for BTH_SET_SERVICE {
}
}
pub type HANDLE_SDP_TYPE = u64;
pub type HBLUETOOTH_DEVICE_FIND = isize;
pub type HBLUETOOTH_RADIO_FIND = isize;
#[repr(C, packed(1))]
#[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`*"]
pub struct RFCOMM_COMMAND {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "newdev.dll""system" #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] fn DiUninstallDriverW ( hwndparent : super::super::Foundation:: HWND , infpath : ::windows_sys::core::PCWSTR , flags : u32 , needreboot : *mut super::super::Foundation:: BOOL ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "setupapi.dll""system" #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] fn InstallHinfSectionA ( window : super::super::Foundation:: HWND , modulehandle : super::super::Foundation:: HINSTANCE , commandline : ::windows_sys::core::PCSTR , showcommand : i32 ) -> ( ) );
::windows_sys::core::link ! ( "setupapi.dll""system" #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] fn InstallHinfSectionA ( window : super::super::Foundation:: HWND , modulehandle : super::super::Foundation:: HMODULE , commandline : ::windows_sys::core::PCSTR , showcommand : i32 ) -> ( ) );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "setupapi.dll""system" #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] fn InstallHinfSectionW ( window : super::super::Foundation:: HWND , modulehandle : super::super::Foundation:: HINSTANCE , commandline : ::windows_sys::core::PCWSTR , showcommand : i32 ) -> ( ) );
::windows_sys::core::link ! ( "setupapi.dll""system" #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] fn InstallHinfSectionW ( window : super::super::Foundation:: HWND , modulehandle : super::super::Foundation:: HMODULE , commandline : ::windows_sys::core::PCWSTR , showcommand : i32 ) -> ( ) );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "setupapi.dll""system" #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] fn SetupAddInstallSectionToDiskSpaceListA ( diskspace : *const ::core::ffi::c_void , infhandle : *const ::core::ffi::c_void , layoutinfhandle : *const ::core::ffi::c_void , sectionname : ::windows_sys::core::PCSTR , reserved1 : *const ::core::ffi::c_void , reserved2 : u32 ) -> super::super::Foundation:: BOOL );
#[cfg(feature = "Win32_Foundation")]
Expand Down
6 changes: 3 additions & 3 deletions crates/libs/sys/src/Windows/Win32/Devices/Fax/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
::windows_sys::core::link ! ( "winfax.dll""system" #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] fn FaxUnregisterServiceProviderW ( deviceprovider : ::windows_sys::core::PCWSTR ) -> super::super::Foundation:: BOOL );
::windows_sys::core::link ! ( "fxsutility.dll""system" #[doc = "*Required features: `\"Win32_Devices_Fax\"`*"] fn SendToFaxRecipient ( sndmode : SendToMode , lpfilename : ::windows_sys::core::PCWSTR ) -> u32 );
#[cfg(feature = "Win32_Foundation")]
::windows_sys::core::link ! ( "sti.dll""system" #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] fn StiCreateInstanceW ( hinst : super::super::Foundation:: HINSTANCE , dwver : u32 , ppsti : *mut IStillImageW , punkouter : ::windows_sys::core::IUnknown ) -> ::windows_sys::core::HRESULT );
::windows_sys::core::link ! ( "sti.dll""system" #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] fn StiCreateInstanceW ( hinst : super::super::Foundation:: HMODULE , dwver : u32 , ppsti : *mut IStillImageW , punkouter : ::windows_sys::core::IUnknown ) -> ::windows_sys::core::HRESULT );
pub type IFaxAccount = *mut ::core::ffi::c_void;
pub type IFaxAccountFolders = *mut ::core::ffi::c_void;
pub type IFaxAccountIncomingArchive = *mut ::core::ffi::c_void;
Expand Down Expand Up @@ -2251,10 +2251,10 @@ pub type PFAX_EXT_GET_DATA = ::core::option::Option<unsafe extern "system" fn(pa
pub type PFAX_EXT_INITIALIZE_CONFIG = ::core::option::Option<unsafe extern "system" fn(param0: PFAX_EXT_GET_DATA, param1: PFAX_EXT_SET_DATA, param2: PFAX_EXT_REGISTER_FOR_EVENTS, param3: PFAX_EXT_UNREGISTER_FOR_EVENTS, param4: PFAX_EXT_FREE_BUFFER) -> ::windows_sys::core::HRESULT>;
#[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub type PFAX_EXT_REGISTER_FOR_EVENTS = ::core::option::Option<unsafe extern "system" fn(param0: super::super::Foundation::HINSTANCE, param1: u32, param2: FAX_ENUM_DEVICE_ID_SOURCE, param3: ::windows_sys::core::PCWSTR, param4: PFAX_EXT_CONFIG_CHANGE) -> super::super::Foundation::HANDLE>;
pub type PFAX_EXT_REGISTER_FOR_EVENTS = ::core::option::Option<unsafe extern "system" fn(param0: super::super::Foundation::HMODULE, param1: u32, param2: FAX_ENUM_DEVICE_ID_SOURCE, param3: ::windows_sys::core::PCWSTR, param4: PFAX_EXT_CONFIG_CHANGE) -> super::super::Foundation::HANDLE>;
#[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub type PFAX_EXT_SET_DATA = ::core::option::Option<unsafe extern "system" fn(param0: super::super::Foundation::HINSTANCE, param1: u32, param2: FAX_ENUM_DEVICE_ID_SOURCE, param3: ::windows_sys::core::PCWSTR, param4: *mut u8, param5: u32) -> u32>;
pub type PFAX_EXT_SET_DATA = ::core::option::Option<unsafe extern "system" fn(param0: super::super::Foundation::HMODULE, param1: u32, param2: FAX_ENUM_DEVICE_ID_SOURCE, param3: ::windows_sys::core::PCWSTR, param4: *mut u8, param5: u32) -> u32>;
#[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub type PFAX_EXT_UNREGISTER_FOR_EVENTS = ::core::option::Option<unsafe extern "system" fn(param0: super::super::Foundation::HANDLE) -> u32>;
Expand Down

0 comments on commit f86349d

Please sign in to comment.