网络包探测软件 DSoft Sniffer 2.9 是不错的Shareware,但有时间限制,如何去除
呢?
以下是Delphi5写的核心部分。
var
r: TRegistry;
t: DWORD;
begin
r := TRegistry.Create;
try
r.RootKey := HKEY_LOCAL_MACHINE;
r.OpenKey('\SOFTWARE\Dsoft\License\Products\3\2', True);
t := DWORD(r.ReadInteger('LastDate')); // Pass while Sniffer is installed.
r.WriteInteger('LastDate', $8f904923);
except
t := $ffffffff;
end;
r.Free;
if t=$ffffffff then
Application.MessageBox(
'DSoft Sniffer 2.9 not installed!',
'Error',
MB_OK+MB_ICONERROR)
else
Application.MessageBox(
'Success! You may use it for a long time. :)',
'Message',
MB_OK+MB_ICONINFORMATION);
end;