Share via


FirewallDeleteRule

This function deletes a firewall rule.

DWORD FirewallDeleteRule(
   HRULE hRule, 
   BOOL bPersist
);

Parameters

  • hRule
    [in] Handle to the rule to delete. This is obtained from FirewallCreateRule or FirewallGetRules.
  • bPersist
    [in] Specifies whether the operation should be persistent: TRUE or FALSE. If FALSE then the rule will not be deleted from registry and will be recreated when the device reboots.

Return Values

Returns ERROR_SUCCESS if operation succeeds. If the argument string is not correct, this function returns ERROR_BAD_ARGUMENTS.

Requirements

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

See Also

Firewall Functions | HRULE | System Errors - Alphabetical Order

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.