NotifyBootConfigStatus

The NotifyBootConfigStatus function reports the boot status to the service control manager. It is used by boot verification programs. This function can be called only by a process running in the LocalSystem or Administrator's account.

BOOL NotifyBootConfigStatus(
  BOOL BootAcceptable   // indicates acceptability of boot 
                        // configuration
);
 

Parameters

BootAcceptable
Specifies whether the configuration used when booting the system is acceptable. If the value is TRUE, the system saves the configuration as the last-known good configuration. If the value is FALSE, the system immediately reboots, using the previously saved last-known good configuration.

Return Values

If the BootAcceptable parameter is FALSE, the function does not return.

If the last-known good configuration was successfully saved, the return value is nonzero.

If an error occurs, the return value is zero. To get extended error information, call GetLastError.

Errors

The following error codes may be set by the service control manager. Other error codes may be set by the registry functions that are called by the service control manager to set parameters in the configuration registry.

Value Meaning
ERROR_ACCESS_DENIED The user does not have permission to perform this operation.

A hard-coded DACL associated with the service control manager object determines who can perform a NotifyBootConfigStatus operation. Only the system and members of the Adminstrators group can do so.


Remarks

Saving the configuration of a running system with this function is an acceptable method for saving the last-known good configuration. If the boot configuration is unacceptable, use this function to reboot the system using the existing last-known good configuration.

QuickInfo

  Windows NT: Requires version 3.5 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in winsvc.h.
  Import Library: Use advapi32.lib.

See Also

Services Overview, Service Functions