Platform SDK: DLLs, Processes, and Threads

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   // boot status
);

Parameters

BootAcceptable
[in] 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.

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.

Error code 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.

Requirements

  Windows NT/2000: Requires Windows NT 3.5 or later.
  Header: Declared in Winsvc.h; include Windows.h.
  Library: Use Advapi32.lib.

See Also

Services Overview, Service Functions