Fórum Trial no delphi. #581035
07/05/2017
0
Eu achei um código para deixar o programa trial, mais como eu faço para adapta-lo no meu software?, vi que é só criar um .dll, mais como vou adptalo ao meu software?
o código é esse
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 NOME DA DLL
ShowMessage('Arquivo de Segurança nao Encontrado!');
Application.Terminate;
End;
AssignFile(F,RetornaSysDir +'\\sgcpro.dll'); NOME DA DLL
Reset(F);
Readln(F, S);
if StrToDate(S) < Date then Begin
ShowMessage('Licença Expirada! Entre em Contato com o Distribuidor');
Showmessage('');
Application.terminate;
End;
CloseFile(F);
o código é esse
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 NOME DA DLL
ShowMessage('Arquivo de Segurança nao Encontrado!');
Application.Terminate;
End;
AssignFile(F,RetornaSysDir +'\\sgcpro.dll'); NOME DA DLL
Reset(F);
Readln(F, S);
if StrToDate(S) < Date then Begin
ShowMessage('Licença Expirada! Entre em Contato com o Distribuidor');
Showmessage('');
Application.terminate;
End;
CloseFile(F);
Fábio Martins
Curtir tópico
+ 0
Responder
Posts
08/05/2017
Robson Morais
bom dia, tente ver esse artigo...
[url]https://www.devmedia.com.br/artigo-clube-delphi-102-desenvolvendo-dlls/11770[/url]
[url]https://www.devmedia.com.br/artigo-clube-delphi-102-desenvolvendo-dlls/11770[/url]
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)