NotifyBootConfigStatus

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 codeDescription
ERROR_ACCESS_DENIEDThe 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
ClientRequires Windows XP, Windows 2000 Professional, or Windows NT Workstation 3.5 and later.
ServerRequires 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.

DLLRequires Advapi32.dll.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值