{$R *.dfm} //------------------------------------------------------------------------------ // // check license sum // //------------------------------------------------------------------------------ procedure checklicensesum(); var ll1:integer; begin
ll1:=Opt.OptSum(); if (Opt.R.CheckSum<>0) and (Opt.R.CheckSum<>ll1) thenbegin
Opt.R.Activated:=false;
error(em+53,'Lizenz abgelaufen');
ExitProcess(91); end;
RandSeed:=GetCurrentTime; end; //------------------------------------------------------------------------------ // // set machine id // //------------------------------------------------------------------------------ procedure setlicenseMachineId(Winid:String); //var ll1:integer; begin
Opt.R.WindowsProductId:=WinId; end; //------------------------------------------------------------------------------ // // check license sum // //------------------------------------------------------------------------------ procedure setlicensesum(); var ll1:integer; begin
ll1:=Opt.OptSum();
Opt.R.CheckSum:=ll1 end; //------------------------------------------------------------------------------ // // check for network fake // //------------------------------------------------------------------------------ procedure checknetwork(); var ip:String; begin
ip:=getIP('cococo.de'); if ip<>'0'then if ip<>'87.230.16.129'then
Opt.R.Activated:=false; end; //------------------------------------------------------------------------------ // // check license // //------------------------------------------------------------------------------ procedure checklicense(); begin if (GetWinProductId<>Opt.R.WindowsProductId) or (Opt.R.LastUse>Today) thenbegin
Opt.R.Activated := false;
Opt.R.Edition:=Standard; ifnot Lizenzmeldung thenbegin
error(em+54,'Die Software funktioniert erst nach Lizensierung und Registrierung!');
Lizenzmeldung:=true end end; if (Opt.R.DaysUsed>EvaluationPeriod) andNot Opt.R.Activated thenbegin
error(em+55,'Lizenz abgelaufen');
TrytoActivate(false); end; // check after 120 days (like Windows does) if (Opt.R.DaysUsed>LicenseCheckTwo) thenbegin If (GetWinProductId<>Opt.R.WindowsProductId) thenbegin
error(em+63,'Lizenz abgelaufen');
TrytoActivate(false); end; end; //-------- test code für activate --------- // //TrytoActivate(false); // //----------------------------------------- end;
//------------------------------------------------------------------------------ // // check edition // //------------------------------------------------------------------------------ procedure checkedition(); begin if Opt.R.Edition>=Enterprise thenbegin
Opt.R.Activated := true;
Opt.R.Edition := Enterprise;
Opt.R.WindowsProductId := GetWinProductId; end; end; //------------------------------------------------------------------------------ // // activate via Internet // //------------------------------------------------------------------------------ procedure TAktivform.AktivierenviaInternet(); var Prod:String;Edit:String;E:Editions; begin
SQLSelect(Code,Prod,Edit); if prod=Application.Title thenbegin for E:=low(Editions) toHigh(Editions) do if EditionStrings[E]=Edit thenbegin
Opt.R.Edition:=E;
Opt.r.Activated:=true;
Opt.R.CheckSum:=Opt.OptSum();
Opt.PutOptions(PChar(Optionsfilename(Application.Title)));
ShowMessage('Bitte neu starten');
Opt.R.SecretKey := SetSecretRegistryValue(Installkey,0,Productnumber);
Opt.R.SecretKey := SetSecretFile(InstallKey,0,Productnumber); end;
SQLUpdate(Code,GetWinProductId,'IP',getCPUID,getDiskId(GetCurrentdir()),'');
ExitProcess(0); endelse
ExitProcess(99); end; //------------------------------------------------------------------------------ // // activate via Internet // //------------------------------------------------------------------------------ procedure TAktivform.AktivierenGetWinProdId(); var Inp,Erg,Key:array [0..64] ofChar;
Pin,Pout,Pkey:PChar;C3,Edit:String; begin
strpcopy(Key,'abcdefgh'); // secret key
Pin:=@Inp;Pout:=@erg;PKey:=@Key; // code to get winprodid
Edit:=EditionStrings[Standard];
C3:=GetWinProductId()+'-'+Edit; if Length(C3)>Codelength then error(em+57,'Code zu lang!'); while Length(C3)<Codelength do C3:=C3+' ';
strpcopy(Pout,'');StrPCopy(Pin,PChar(C3));
Opt.DoActivate(Pin,Pout,PKey);
strpcopy(Pin,'');
Opt.DoActivate(Pin,Pout,PKey);
Clipboard.SetTextBuf(Pout);
ShowMessage('Code '+crlf+crlf+'"'+Pout+'"'+crlf+crlf+' ist in der Zwischeanablage'); end; //------------------------------------------------------------------------------ // // activate via Internet // //------------------------------------------------------------------------------ procedure TAktivform.AktivierenviaCode(); var Inp,Erg,Win,Key:array [0..64] ofChar;E:Editions;
Pin,Pout,Pwin,Pkey:PChar;C1,C2,Edit:String;i:integer; begin
strpcopy(Key,'abcdefgh'); // secret key
Pin:=@Inp;Pout:=@erg;PKey:=@Key;PWin:=@win; // now decode Code
strpcopy(Pin,'');StrPCopy(Pout,PChar(Code));
Opt.DoActivate(Pin,Pout,PKey);
strpcopy(PWin,GetWinProductId());
C1:=PWin;C2:=Trim(Pin);
i:=length(C2);while C2[i] in ['a'..'z','A'..'Z','0'..'9'] do i:=i-1;
Edit:=MidStr(C2,i+1,Length(C2)-i);C2:=MidStr(C2,1,i-1); if C1=C2 thenbegin for E:=low(Editions) toHigh(Editions) do if EditionStrings[E]=Edit thenbegin
Opt.R.Edition:=Standard;
Opt.R.Activated:=true;
Opt.R.CheckSum:=Opt.OptSum();
Opt.PutOptions(PChar(Optionsfilename(Application.Title)));
ShowMessage('Bitte neu starten');
Opt.R.SecretKey := SetSecretRegistryValue(Installkey,0,Productnumber);
Opt.R.SecretKey := SetSecretFile(InstallKey,0,Productnumber);
ExitProcess(0); end; end; end; //------------------------------------------------------------------------------ // // check edition // //------------------------------------------------------------------------------ procedure TrytoActivate(goon:boolean); begin
Aktivform := TAktivform.Create(nil);
dostop:=not goon;
Aktivform.ShowModal; end; //------------------------------------------------------------------------------ // // check edition // //------------------------------------------------------------------------------ procedure TAktivform.Button1Click(Sender: TObject); begin
Name:=Edit1.Text;
Code:=Edit2.Text; // code to get winprodid //AktivierenGetWinProdId(); if length(code)<=MySQLlength then AktivierenviaInternet() else AktivierenviaCode(); end; //------------------------------------------------------------------------------ // // check edition // //------------------------------------------------------------------------------ procedure TAktivform.Button2Click(Sender: TObject); begin
Close; if dostop then ExitProcess(0); end; procedure TAktivform.Form1DruckenExecute(Sender: TObject); begin
end;
{------------------------------------------------------------------}
{- -}
{- Ende dieser Quelle -}
{- -}
{------------------------------------------------------------------} end.
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.