SetupDiGetDeviceRegistryProperty

C# Signature:

[DllImport("setupapi.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool SetupDiGetDeviceRegistryProperty(
    IntPtr deviceInfoSet,
    ref SP_DEVINFO_DATA deviceInfoData,
    uint property,
    out UInt32 propertyRegDataType,
    byte[] propertyBuffer,
    uint propertyBufferSize,
    out UInt32 requiredSize
    );

Alternate C# Signature:

[DllImport("setupapi.dll", SetLastError = true)]
public static extern bool SetupDiGetDeviceRegistryProperty(
    IntPtr deviceInfoSet,
    ref SP_DEVINFO_DATA deviceInfoData,
    uint property,
    out UInt32 propertyRegDataType,
    IntPtr propertyBuffer, // the difference between this signature and the one above.
    uint propertyBufferSize,
    out UInt32 requiredSize
    );

VB Signature:

Possible values for Property.

Sample Code:

Alternative Sample Code:

Última actualización