INetFwService::Enabled Property for Windows7 machine RRS feed

  • Question

  • Hi I am using the below code to enable UPnp on WinXP

    put_Enabled(VARIENT_TRUE);  //enable Upnp

    VARIANT_BOOL vbEnabled;
    get_Enabled(&vbEnabled);   // get upnp

    It works fine when I run on WindowsXP machine.

    But when I run on Windows7, though put_Enabled(VARIENT_TRUE) returns S_OK, but when i read back using get_Enabled() it gives VARIENT_FALSE.

    I found that Upnp is equivalent to "Network Discovery".

    Please let me know which API to use to enable/disable Firewall "Network Discovery" on Windows7

    Wednesday, April 27, 2011 12:36 PM


All replies