The CM_PARTIAL_RESOURCE_DESCRIPTOR structure is currently missing the #[repr(C, packed(4))] attribute, which is necessary to ensure 4-byte alignment on x86_64 targets. This issue leads to the CM_PARTIAL_RESOURCE_LIST structure having a size of 32 bytes instead of the expected 28 bytes.
In wdm.h of the WDK, the definition of CM_PARTIAL_RESOURCE_DESCRIPTOR is currently preceded by a
#include "pshpack4.h"
directive, which ensures the correct alignment.
Crate manifest
[dependencies.windows]
version = "0.54.0"
features = ["Wdk", "Wdk_System", "Wdk_System_SystemServices"]
Summary
The CM_PARTIAL_RESOURCE_DESCRIPTOR structure is currently missing the
#[repr(C, packed(4))]
attribute, which is necessary to ensure 4-byte alignment on x86_64 targets. This issue leads to the CM_PARTIAL_RESOURCE_LIST structure having a size of 32 bytes instead of the expected 28 bytes.In
wdm.h
of the WDK, the definition ofCM_PARTIAL_RESOURCE_DESCRIPTOR
is currently preceded by adirective, which ensures the correct alignment.
Crate manifest
Crate code
No response