Código
F : TextFile;
S: string;
MeuBuffer: Array [1..128] of Char;
retorno: Integer;
RetornaSysDir: String;
begin
retorno := GetSystemDirectory(@MeuBuffer,128);
if (retorno > 128) OR (retorno=0) then Begin
RetornaSysDir:=''
end else Begin
RetornaSysDir:=StrPas(@MeuBuffer);
end;
if not FileExists(RetornaSysDir +'sgcpro.dll') Then Begin
ShowMessage('Arquivo de Segurança nao Encontrado!');
Application.Terminate;
End;
AssignFile(F,RetornaSysDir +'sgcpro.dll');
Reset(F);
Readln(F, S);
if StrToDate(S) < Date then Begin
ShowMessage('Licença Expirada! Entre em Contato com o Distribuidor');
Showmessage('E-mail: felipe@delphi.eti.br');
Application.terminate;
End;
CloseFile(F);
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009