Share via


FirewallEnableRule (Windows Embedded CE 6.0)

1/6/2010

This function enables or disables a firewall rule.

Syntax

DWORD FirewallEnableRule(
  HRULE hRule, 
  BOOL bEnabled, 
  BOOL bPersist
);

Parameters

  • hRule
    [in] Handle to the rule to enable or disable.
  • bEnabled
    [in] TRUE to enable the rule, and FALSE otherwise.
  • bPersist
    [in] TRUE to save the setting in the registry so that it preserved when a reboot occurs, or FALSE otherwise.

Return Value

Returns ERROR_SUCCESS if operation succeeds.

Requirements

Header fwapi.h
Library fwapi.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

IP Firewall Functions
HRULE

Other Resources

System Errors - Alphabetical Order