嫩
嫩手
Unregistered / Unconfirmed
GUEST, unregistred user!
DLL里包括这个函数即可:(我主要是想看看大家都怎么写,如果我写的格式不对,请更正)
procedure do
ntReboot(XP_Reboot:Boolean);stdcall;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey('System/CurrentControlSet/Control/CrashControl',true);
if XP_Reboot then
Reg.WriteInteger('AutoReboot',0)
else
Reg.WriteInteger('AutoReboot',1)
finally
Reg.CloseKey;
Reg.Free;
end;
end;
procedure do
ntReboot(XP_Reboot:Boolean);stdcall;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey('System/CurrentControlSet/Control/CrashControl',true);
if XP_Reboot then
Reg.WriteInteger('AutoReboot',0)
else
Reg.WriteInteger('AutoReboot',1)
finally
Reg.CloseKey;
Reg.Free;
end;
end;