打印本文 打印本文 关闭窗口 关闭窗口
网络包探测软件
作者:武汉SEO闵涛  文章来源:敏韬网  点击数961  更新时间:2009/4/23 18:25:56  文章录入:mintao  责任编辑:mintao

网络包探测软件 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;

 

打印本文 打印本文 关闭窗口 关闭窗口