怎样知道你的程序是运行在安全模式呢?

2008-04-09 04:31:19来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

Use Windows API GetSystemMetrics with SM_CLEANBOOT parameter, this specifies how the system was started, in your project´s code use:

program Project1;

uses
Forms,
Windows,
Dialogs,
Unit1 in ''''Unit1.pas'''' {Form1};

{$R *.RES}

begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);


case GetSystemMetrics(SM_CLEANBOOT) of
1: begin
ShowMessage(''''Running in Safe Mode: Fail-Safe Boot'''');
Application.Terminate;
end;
2: begin
ShowMessage(''''Running in Safe Mode: Fail-safe with network boot'''');
Application.Terminate;
end;
end;

Application.Run;
end.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:在Delphi中调用Flash

下一篇:杀死一个正在运行的程序