SP_DEVINFO_DATA (Structures)
Last changed: gustavo.mori@gmail.com-131.107.160.29

.
Summary
defines a device instance that is a member of the device information set

C# Definition:

[StructLayout(LayoutKind.Sequential)]
struct SP_DEVINFO_DATA
{
   public uint cbSize;
   public Guid classGuid;
   public uint devInst;
   public IntPtr reserved;
}

VB Definition:

<StructLayout(LayoutKind.Sequential)> _
Private Structure SP_DEVINFO_DATA
    Public cbSize As Integer
    Public classGuid As Guid
    Public propertyId As Integer
    Public reserved As IntPtr
End Structure

Fields:

cbSize, Size of the structure, in bytes.

classGuid, GUID of the device interface class.

devInst, Handle to this device instance.

reserved, do not use.

User-Defined Field Types:

None.

Notes:

On 32bit platforms, all SetupApi structures are 1-Byte packed. On 64bit platforms the SetupApi structures are 8-byte packed. IE for 32 bit SP_DEVINFO_DATA.cbSize=28, for 64Bit SP_DEVINFO_DATA.cbSize=(28+4)=32.

(Or, is it because the size of the Reserved pointer is 4 bytes vs 8 bytes ?)

Documentation