FirewallSetInterface

This function specifies whether a network interface should be protected by the firewall.

DWORD FirewallSetInterface(
  LPCWSTR pszInterfaceName, 
  BOOL bFirewalled, 
  BOOL bPersist
);

Parameters

  • pszInterfaceName
    [in] Pointer to a null-terminated Unicode string that specifies the name of the network interface. For example, for the first PCI NE2000 adapter, type PCI\NE20001.
  • bFirewalled
    [in] Specifies whether the interface should be protected by the firewall: TRUE or FALSE.
  • bPersist
    [in] Specifies whether to save the setting in the registry so that it preserved when a reboot occurs: TRUE or FALSE.

Return Values

Returns ERROR_SUCCESS if operation succeeds.

Requirements

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

See Also

Firewall Functions

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.