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 );
Parameters
-
BootAcceptable
- [in] 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.
| Return code | Description |
|---|---|
| ERROR_ACCESS_DENIED | The user does not have permission to perform this operation. Only the system and members of the Administrator's 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.
This function call requires the SC_MANAGER_MODIFY_BOOT_CONFIG access right. For more information, see Service Security and Access Rights.
Requirements
| Client | Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation 3.5 and later. |
|---|---|
| Server | Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 3.5 and later. |
| Header | Declared in Winsvc.h; include Windows.h. |
| Library | Link to Advapi32.lib. |
| DLL | Requires Advapi32.dll. |
博客介绍了NotifyBootConfigStatus函数,该函数用于向服务控制管理器报告启动状态,供启动验证程序使用,仅特定账户进程可调用。还说明了其参数、返回值情况,以及保存配置的方法和所需访问权限等信息。
68

被折叠的 条评论
为什么被折叠?



