delphi如何过XP的防火墙而不被拦截


本文整理自网络,侵删。

  
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的防火墙了,不会再有拦截提示了!

相关阅读 >>

Delphi stringgrid之属性大全

Delphi url取得文件名

Delphi中dbgrid控件数据库点击某列按序排列

Delphi string.parse

print documents from Delphi - print pdf, doc, xls, html, rtf, docx, txt

Delphi mediaplayer1 设置音量

Delphi olevariant excel保存文件

Delphi中怎么取出字符串中单个char

Delphi 使用 inputbox、inputquery 的启发

Delphi 将svg加载到timage控件

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...