Skip to content

Commit

Permalink
Update Win32 metadata to 17.0.9 (#1482)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Feb 1, 2022
1 parent 2c54231 commit 9a27020
Show file tree
Hide file tree
Showing 253 changed files with 35,118 additions and 3,795 deletions.
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
Expand Up @@ -4,7 +4,7 @@ dependent crate or workspace has an empty or non-existent `.windows/winmd` direc

## Windows.Win32.winmd
- Source: https://www.nuget.org/packages/Microsoft.Windows.SDK.Win32Metadata/
- Version: 15.0.22-preview
- Version: 17.0.9-preview

## Windows.winmd
- Source: https://www.nuget.org/packages/Microsoft.Windows.SDK.Contracts
Expand Down
3 changes: 2 additions & 1 deletion crates/libs/metadata/src/method_signature.rs
Expand Up @@ -4,6 +4,7 @@ pub struct MethodSignature {
pub params: Vec<MethodParam>,
pub return_sig: Option<Signature>,
pub return_param: Option<Param>,
pub preserve_sig: bool,
}

#[derive(Clone)]
Expand All @@ -26,7 +27,7 @@ impl MethodSignature {
}

pub fn kind(&self) -> SignatureKind {
if self.return_param.as_ref().map_or(false, |param| param.has_alternate_success_code()) {
if self.preserve_sig {
return SignatureKind::PreserveSig;
}

Expand Down
7 changes: 6 additions & 1 deletion crates/libs/metadata/src/tables/method_def.rs
Expand Up @@ -14,6 +14,10 @@ impl MethodDef {
self.0.u32(2) & 0b1000_0000_0000 != 0
}

pub fn preserve_sig(&self) -> bool {
self.0.u32(1) & 0b1000_0000 != 0
}

pub fn params(&self) -> impl Iterator<Item = Param> {
self.0.list(5, TableIndex::Param).map(Param)
}
Expand Down Expand Up @@ -94,6 +98,7 @@ impl MethodDef {

let return_sig = reader.signature_from_blob(&mut blob, None, generics);
let mut return_param = None;
let preserve_sig = self.preserve_sig();

let params = params
.filter_map(|param| {
Expand All @@ -106,6 +111,6 @@ impl MethodDef {
})
.collect();

MethodSignature { params, return_sig, return_param }
MethodSignature { params, return_sig, return_param, preserve_sig }
}
}
4 changes: 0 additions & 4 deletions crates/libs/metadata/src/tables/param.rs
Expand Up @@ -40,8 +40,4 @@ impl Param {
// TODO: replace bool return with actual array info from attribute
self.has_attribute("NativeArrayInfoAttribute")
}

pub fn has_alternate_success_code(&self) -> bool {
self.has_attribute("AlternateSuccessCodesAttribute")
}
}
6 changes: 6 additions & 0 deletions crates/libs/sys/src/Windows/Win32/Data/HtmlHelp/mod.rs
Expand Up @@ -827,6 +827,12 @@ pub const STDPROP_USERPROP_BASE: u32 = 65536u32;
#[doc = "*Required features: 'Win32_Data_HtmlHelp'*"]
pub const STDPROP_USERPROP_MAX: u32 = 2147483647u32;
#[doc = "*Required features: 'Win32_Data_HtmlHelp'*"]
pub const SZ_WWDEST_GLOBAL: &'static str = "GLOBAL";
#[doc = "*Required features: 'Win32_Data_HtmlHelp'*"]
pub const SZ_WWDEST_KEY: &'static str = "KEY";
#[doc = "*Required features: 'Win32_Data_HtmlHelp'*"]
pub const SZ_WWDEST_OCC: &'static str = "OCC";
#[doc = "*Required features: 'Win32_Data_HtmlHelp'*"]
pub const TYPE_POINTER: u32 = 1u32;
#[doc = "*Required features: 'Win32_Data_HtmlHelp'*"]
pub const TYPE_STRING: u32 = 2u32;
Expand Down
Expand Up @@ -408,6 +408,10 @@ impl ::core::clone::Clone for DRM_CLIENT_VERSION_INFO {
}
}
#[doc = "*Required features: 'Win32_Data_RightsManagement'*"]
pub const DRM_DEFAULTGROUPIDTYPE_PASSPORT: &'static str = "PassportAuthProvider";
#[doc = "*Required features: 'Win32_Data_RightsManagement'*"]
pub const DRM_DEFAULTGROUPIDTYPE_WINDOWSAUTH: &'static str = "WindowsAuthProvider";
#[doc = "*Required features: 'Win32_Data_RightsManagement'*"]
pub type DRM_DISTRIBUTION_POINT_INFO = i32;
#[doc = "*Required features: 'Win32_Data_RightsManagement'*"]
pub const DRM_DISTRIBUTION_POINT_LICENSE_ACQUISITION: DRM_DISTRIBUTION_POINT_INFO = 0i32;
Expand Down
2 changes: 2 additions & 0 deletions crates/libs/sys/src/Windows/Win32/Devices/AllJoyn/mod.rs
Expand Up @@ -1379,6 +1379,8 @@ pub const ALLJOYN_MESSAGE_FLAG_NO_REPLY_EXPECTED: u32 = 1u32;
#[doc = "*Required features: 'Win32_Devices_AllJoyn'*"]
pub const ALLJOYN_MESSAGE_FLAG_SESSIONLESS: u32 = 16u32;
#[doc = "*Required features: 'Win32_Devices_AllJoyn'*"]
pub const ALLJOYN_NAMED_PIPE_CONNECT_SPEC: &'static str = "npipe:";
#[doc = "*Required features: 'Win32_Devices_AllJoyn'*"]
pub const ALLJOYN_PROP_ACCESS_READ: u8 = 1u8;
#[doc = "*Required features: 'Win32_Devices_AllJoyn'*"]
pub const ALLJOYN_PROP_ACCESS_RW: u8 = 3u8;
Expand Down
18 changes: 18 additions & 0 deletions crates/libs/sys/src/Windows/Win32/Devices/Bluetooth/mod.rs
Expand Up @@ -2355,6 +2355,24 @@ pub const STRING_DESCRIPTION_OFFSET: u32 = 1u32;
pub const STRING_NAME_OFFSET: u32 = 0u32;
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STRING_PROVIDER_NAME_OFFSET: u32 = 2u32;
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STR_ADDR_FMT: &'static str = "(%02x:%02x:%02x:%02x:%02x:%02x)";
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STR_ADDR_FMTA: &'static str = "(%02x:%02x:%02x:%02x:%02x:%02x)";
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STR_ADDR_FMTW: &'static str = "(%02x:%02x:%02x:%02x:%02x:%02x)";
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STR_ADDR_SHORT_FMT: &'static str = "%04x%08x";
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STR_ADDR_SHORT_FMTA: &'static str = "%04x%08x";
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STR_ADDR_SHORT_FMTW: &'static str = "%04x%08x";
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STR_USBHCI_CLASS_HARDWAREID: &'static str = "USB\\Class_E0&SubClass_01&Prot_01";
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STR_USBHCI_CLASS_HARDWAREIDA: &'static str = "USB\\Class_E0&SubClass_01&Prot_01";
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const STR_USBHCI_CLASS_HARDWAREIDW: &'static str = "USB\\Class_E0&SubClass_01&Prot_01";
pub const SVCID_BTH_PROVIDER: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 111829984, data2: 32096, data3: 16895, data4: [175, 178, 62, 230, 210, 217, 57, 45] };
#[doc = "*Required features: 'Win32_Devices_Bluetooth'*"]
pub const SYNCH_DATA_STORE_CALENDAR: u32 = 3u32;
Expand Down
24 changes: 22 additions & 2 deletions crates/libs/sys/src/Windows/Win32/Devices/Communication/mod.rs
Expand Up @@ -237,8 +237,8 @@ pub struct DCB {
pub XonLim: u16,
pub XoffLim: u16,
pub ByteSize: u8,
pub Parity: u8,
pub StopBits: u8,
pub Parity: DCB_PARITY,
pub StopBits: DCB_STOP_BITS,
pub XonChar: super::super::Foundation::CHAR,
pub XoffChar: super::super::Foundation::CHAR,
pub ErrorChar: super::super::Foundation::CHAR,
Expand All @@ -255,6 +255,26 @@ impl ::core::clone::Clone for DCB {
}
}
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub type DCB_PARITY = u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub const EVENPARITY: DCB_PARITY = 2u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub const MARKPARITY: DCB_PARITY = 3u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub const NOPARITY: DCB_PARITY = 0u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub const ODDPARITY: DCB_PARITY = 1u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub const SPACEPARITY: DCB_PARITY = 4u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub type DCB_STOP_BITS = u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub const ONESTOPBIT: DCB_STOP_BITS = 0u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub const ONE5STOPBITS: DCB_STOP_BITS = 1u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub const TWOSTOPBITS: DCB_STOP_BITS = 2u8;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub type ESCAPE_COMM_FUNCTION = u32;
#[doc = "*Required features: 'Win32_Devices_Communication'*"]
pub const CLRBREAK: ESCAPE_COMM_FUNCTION = 9u32;
Expand Down

0 comments on commit 9a27020

Please sign in to comment.