locked
INetFwService::Enabled Property for Windows7 machine RRS feed

  • Question

  • Hi I am using VS 2005 with Windows SDK 7.0A. Below is my code

    put_Enabled(VARIENT_TRUE);

    VARIANT_BOOL vbEnabled;
    get_Enabled(&vbEnabled);

    It works fine when I run on WindowsXP machine.

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

    When I searched msdn "http://msdn.microsoft.com/en-us/library/aa365506%28v=vs.85%29.aspx" found that it supports only XP and Vista.

    Is there any alternate API for Windows7?

    Wednesday, April 27, 2011 7:40 AM

All replies

  • Updated:

    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
  • INetFwService.put_Enabled(VARIENT_TRUE) is not working(not able to enable "Network Discovery" when run on Windows7 system.

    but INetFwService.put_Enabled(VARIENT_FALSE) is working (able to disable "Network Discovery" when run on Windows7 system.

    What could be the reason?

    Wednesday, April 27, 2011 2:08 PM