安全中国首页 > 文章中心 > 黑客编程
 
安全中国网友投稿专用上传FTP空间:
Ftp服务器:download.anqn.com
Ftp端口:21
用户名:anqn
密 码:anqn.com
 

让你的程序通过XP防火墙(delphi编程)

更新时间:2007-11-14 1:33:15
责任编辑:阿loosen
热 点:
procedure TForm1.Button1Click(Sender: TObject);
var
  FwMgr,Profile,FwApp: variant;
begin
  FwMgr := CreateOLEObject('HNetCfg.FwMgr');
  Profile := FwMgr.LocalPolicy.CurrentProfile;
  FwApp := CreateOLEObject('HNetCfg.FwAuthorizedApplication');
  FwApp.Name :='我的测试'; //显示名字
  FwApp.ProcessImageFileName := Application.ExeName; //要通过的程序
  FwApp.Enabled  := true;
  Profile.AuthorizedApplications.Add(FwApp);
end;

这样,你的软件就能通过XP的防火墙了,不会再有拦截提示了!

 
相关文章
一日一文章
 
一日一软件
一日一动画