Kod:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace guvenlik_duvari_kontrol
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private **** btnKontrol_Click(object sender, EventArgs e)
{
Type t = Type.GetTypeFromProgID("HNetCfg.FwMgr");
dynamic dy = Activator.CreateInstance(t);
MessageBox.Show("Güvenli Duvarı Durumu --> " +
Convert.ToString(dy.LocalPolicy.CurrentProfile.FirewallEnabled));
}
}
}
