Share via


FirewallEnable (Windows CE 5.0)

Send Feedback

This function enables or disables the firewall. The initial state of the firewall, after the device boots, depends on registry settings.

DWORD FirewallEnable(  USHORT Family,  BOOL bEnable,  BOOL bPersist);

Parameters

  • Family
    [in] The family to which the firewall is enabled. The following table shows the possible values.
    Value Description
    AF_INET Enable or disable the IPv4 firewall.
    AF_INET6 Enable or disable the IPv6 firewall.
    AF_UNSPEC Enable or disable both the IPv4 and IPv6 firewall.
  • bEnable
    [in] TRUE to enable the firewall, or FALSE to disable it.
  • bPersist
    [in] TRUE to save the setting in the registry so that it is preserved when a reboot occurs, or FALSE otherwise.

Return Values

Returns ERROR_SUCCESS if operation succeeds. Otherwise, this function returns a DWORD error code.

Remarks

The initial state of the firewall, after the device boots, is either enabled or disabled, depending on registry settings. You can change the default settings by using this function with bPersist set to TRUE.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Fwapi.h.
Link Library: Fwapi.lib.

See Also

IP Firewall Functions | IP Firewall Registry Settings

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.