Why need reboot after set NVMe device disable throuth call SetupDiCallClassInstaller

Ligang LG2 Guo 1 Reputation point
2023-09-05T03:39:32.0533333+00:00

In response to a DIF code supplied by SetupDiCallClassInstaller, class installers and co-installers might perform operations that require the system to be restarted. In such situations, the installer or co-installer should do the following:

  1. Call SetupDiGetDeviceInstallParams to obtain the SP_DEVINSTALL_PARAMS structure.
  2. Set the DI_NEEDREBOOT or DI_NEEDRESTART flag in the structure's Flags member.
  3. Call SetupDiSetDeviceInstallParams, supplying the updated SP_DEVINSTALL_PARAMS structure, to save the revised Flags member.

After__SetupDiCallClassInstaller__returns, the device installation application that called it should callSetupDiGetDeviceInstallParams, check the flags, and request a restart if necessary.

I'd like to know when the installer or co-installer will set DI_NEEDREBOOT, thanks.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,418 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,526 questions
{count} votes