Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. INetFwMgr

INetFwMgr

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    barneyb81
    wrote on last edited by
    #1

    I'm trying to obtain the Windows Firewall status, which is simple enough using the get_FirewallEnabled method on INetFwProfile. The problem is that this only retrieves the local policy, which could have been overridden by the group policy and so is sometimes wrong. Does anyone know if there's a way of retrieving the group policy? There's a get_CurrentProfileType on INetFwMgr, but this just seems to return NET_FW_PROFILE_STANDARD regardless of the policy. There's a NEW_FW_POLICY_TYPE enum, but it's not used in any methods that I can find. Thanks!

    H 1 Reply Last reply
    0
    • B barneyb81

      I'm trying to obtain the Windows Firewall status, which is simple enough using the get_FirewallEnabled method on INetFwProfile. The problem is that this only retrieves the local policy, which could have been overridden by the group policy and so is sometimes wrong. Does anyone know if there's a way of retrieving the group policy? There's a get_CurrentProfileType on INetFwMgr, but this just seems to return NET_FW_PROFILE_STANDARD regardless of the policy. There's a NEW_FW_POLICY_TYPE enum, but it's not used in any methods that I can find. Thanks!

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      MSDN has examples for work with Firewall did you see Using Windows Firewall API[^]?

      Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

      B 1 Reply Last reply
      0
      • H Hamid Taebi

        MSDN has examples for work with Firewall did you see Using Windows Firewall API[^]?

        Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

        B Offline
        B Offline
        barneyb81
        wrote on last edited by
        #3

        Thanks. I'd read through this documentation, and can't find any way of obtaining the group policy (or indeed even of telling whether or not the local policy is being overridden). Given the existence of the NET_FW_POLICY_TYPE enum, I'd like to think it's possible, but I'm starting to think maybe it's not...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups