C# Class VideoHelper.FireWallHelp

可直接引用windows\system32下的firewallapi.dll
ファイルを表示 Open project: hanksoft/KillJD

Public Methods

Method Description
NetFwAddApps ( string name, string executablePath ) : void

将应用程序添加到防火墙例外

NetFwAddPorts ( string name, int port, string protocol ) : void

添加防火墙例外端口

NetFwDelApps ( int port, string protocol ) : void

删除防火墙例外端口

NetFwDelApps ( string executablePath ) : void

删除防火墙例外中应用程序

Method Details

NetFwAddApps() public static method

将应用程序添加到防火墙例外
public static NetFwAddApps ( string name, string executablePath ) : void
name string 应用程序名称
executablePath string 应用程序可执行文件全路径
return void

NetFwAddPorts() public static method

添加防火墙例外端口
public static NetFwAddPorts ( string name, int port, string protocol ) : void
name string 名称
port int 端口
protocol string 协议(TCP、UDP)
return void

NetFwDelApps() public static method

删除防火墙例外端口
public static NetFwDelApps ( int port, string protocol ) : void
port int 端口
protocol string 协议(TCP、UDP)
return void

NetFwDelApps() public static method

删除防火墙例外中应用程序
public static NetFwDelApps ( string executablePath ) : void
executablePath string 程序的绝对路径
return void