My KMDF driver is installed via the following sequence from a user-mode app:
SetupCopyOEMInfW(path_to_inf_file, SPOST_PATH, );
SetupDiCallClassInstaller(DIF_REGISTERDEVICE, );
//Install the driver in the driver store
DiInstallDevice(,,);
From what I understand DiInstallDevice just copies my driver to the driver store and then (shortly thereafter) the PnP starts it. So the result returned by DiInstallDevice is just concerning the fact of whether the driver was installed in the driver store or not.
In case the driver fails to initialize (start), its DriverEntry may return a failure status code.
Is there a way to know from the user-mode app that called DiInstallDevice that the driver failed to start? Other than just polling for it with the SetupDi* functions.