Skip to content

Commit

Permalink
Small fixes to rule creation with new App setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
AtlasHackert committed Apr 12, 2017
1 parent 45bdb7c commit c0d0615
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Common/Helpers/FirewallHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class FirewallHelper
//private const uint LOAD_LIBRARY_AS_DATAFILE = 0&00000002;

private static INetFwPolicy2 firewallPolicy = (INetFwPolicy2)Activator.CreateInstance(Type.GetTypeFromProgID("HNetCfg.FwPolicy2"));
private const string indParamFormat = "{0}#$#{1}#$#{2}#$#{3}#$#{4}#$#{5}#$#{6}#$#{7}#$#{8}";
private const string indParamFormat = "{0}#$#{1}#$#{2}#$#{3}#$#{4}#$#{5}#$#{6}#$#{7}#$#{8}#$#{9}";
private static string WFNRuleManagerEXE = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "RuleManager.exe");

public abstract class Rule
Expand Down Expand Up @@ -618,7 +618,7 @@ public static bool AddRule(string ruleName, string currentPath, string currentAp
if (!String.IsNullOrEmpty(currentAppPkgId))
{
//Need INetFwRule3
firewallRule = (INetFwRule3)Activator.CreateInstance(Type.GetTypeFromProgID("HNetCfg.FWRule3"));
firewallRule = (INetFwRule3)Activator.CreateInstance(Type.GetTypeFromProgID("HNetCfg.FWRule"));
}
else
{
Expand Down

0 comments on commit c0d0615

Please sign in to comment.