WindowsFirewallHelper icon indicating copy to clipboard operation
WindowsFirewallHelper copied to clipboard

Class not registered exception when attempting to use library

Open Strahan201 opened this issue 1 year ago • 0 comments

Hi!

I found this library and was happy to see how easy it would make adding a rule for my app. I did:

if (FirewallManager.Instance.Rules.Any(x => x.Name.Matches("GameManager"))) return;

When I run it, I'm getting:

System.Runtime.InteropServices.COMException
  HResult=0x80040154
  Message=Retrieving the COM class factory for component with CLSID {9C27C8DA-189B-4DDE-89F7-8B39A316782C} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
  Source=mscorlib
  StackTrace:
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at WindowsFirewallHelper.COMTypeResolver.CreateInstance[T]() in C:\Users\s_fal\Documents\Personal\Open-Source Projects\WindowsFirewallHelper\WindowsFirewallHelper\COMTypeResolver.cs:line 71

Any idea what's going on? Thanks!

Strahan201 avatar Jun 07 '24 21:06 Strahan201