internal FirewallWrapper() { try { this.manager = (INetFirewallMgr)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(FwMgrClassId))); this.localPolicy = this.manager.LocalPolicy; this.currentProfile = this.localPolicy.CurrentProfile; this.openPorts = this.currentProfile.GloballyOpenPorts; } catch (COMException) { this.manager = null; this.localPolicy = null; this.currentProfile = null; this.openPorts = null; } catch (MethodAccessException ex) { throw new WsatAdminException(WsatAdminErrorCode.FIREWALL_ACCESS_DENIED, SR.GetString(SR.FirewallAccessDenied), ex); } }