Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Commit 08a441a

Browse files
authored
Merge pull request #386 from luke-dixon/fix_sp_devinfo_data_struct_layout
Correct layout of SP_DEVINFO_DATA struct
2 parents 9ecf26c + 4738e2b commit 08a441a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/SetupApi/SetupApi+SP_DEVINFO_DATA.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ public partial class SetupApi
2222
[StructLayout(LayoutKind.Sequential, Pack = 1)]
2323
public struct SP_DEVINFO_DATA
2424
{
25+
/// <summary>
26+
/// The size, in bytes, of the <see cref="SP_DEVINFO_DATA" /> structure. The constructor set this value automatically
27+
/// to the correct size.
28+
/// </summary>
29+
public int Size;
30+
2531
/// <summary>
2632
/// The GUID of the device's setup class.
2733
/// </summary>
@@ -42,12 +48,6 @@ public struct SP_DEVINFO_DATA
4248
/// </summary>
4349
public IntPtr Reserved;
4450

45-
/// <summary>
46-
/// The size, in bytes, of the <see cref="SP_DEVINFO_DATA" /> structure. The constructor set this value automatically
47-
/// to the correct size.
48-
/// </summary>
49-
public int Size;
50-
5151
/// <summary>
5252
/// Initializes a new instance of the <see cref="SP_DEVINFO_DATA" /> struct
5353
/// with <see cref="Size" /> set to the correct value.

0 commit comments

Comments
 (0)