AlbertSec
AlbertSec

Reputation: 91

How to check if the firewall is enabled in Windows in C

I would like to check if the firewall is enabled in Windows through C code, I found some methods in C# but only a little bit information from C, How I could do that?, thanks

Upvotes: 0

Views: 1760

Answers (2)

Werner Henze
Werner Henze

Reputation: 16726

You could use the Windows Firewall API. For Windows XP you read the InetFwProfile::FirewallEnabled property. On Vista or later you could use the Windows Firewall with Advanced Security API.

Upvotes: 3

Balu
Balu

Reputation: 2447

use INetFwProfile interface . MSDN example of [c++] is available here.

Upvotes: 1

Related Questions