您的位置:首页 > 移动开发

Allow Only One Application Execution Per Windows Session

2009-11-29 11:38 274 查看
program Project1;

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

{$R *.res}

begin
Application.Initialize;

if 0 = GlobalFindAtom('SOME-UNIQUE-TEXT-RELATED-TO-THIS-APPLICATION') then
begin
GlobalAddAtom('SOME-UNIQUE-TEXT-RELATED-TO-THIS-APPLICATION') ;

Application.CreateForm(TForm, Form1) ;
Application.Run;
end
else
begin
Application.MessageBox(
'You can run the trial version '+
'of this application '+
'only once per Windows session!',
'Test Trial Protection') ;
end;

end.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐