SetupDiGetDeviceInstallParams (setupapi)
Last changed: -198.135.207.175

.
Summary
TODO - a short description

C# Signature:

[DllImport("setupapi.dll", SetLastError=true)]
static extern TODO SetupDiGetDeviceInstallParams(TODO);

VB Signature:

<DllImport("setupapi.dll")> _
Public Shared Function SetupDiGetDeviceInstallParams(ByVal hDevinfo As Integer, _  'Alternate ByVal hDevInfo as IntPtr
                              ByRef DeviceInfoData As SP_DEVINFO_DATA, _
                              ByRef DeviceInstallParams As SP_DEVINSTALL_PARAMS _
                              ) As Boolean
End Function

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

' see if device needs reboot
Dim devParams As SP_DEVINSTALL_PARAMS
devParams.cbSize = Marshal.SizeOf(devParams)
If Win32.SetupDiGetDeviceInstallParams(hDevInfo, DeviceInfoData, devParams) Then
  If (devParams.Flags And Win32.DI_NEEDRESTART) = Win32.DI_NEEDRESTART OrElse (devParams.Flags And Win32.DI_NEEDREBOOT) = Win32.DI_NEEDREBOOT Then
   Return True
  End If
Else
   Return False
End If

Documentation