Skip to content

Latest commit

 

History

History
172 lines (141 loc) · 3.7 KB

nf-netfw-inetfwopenports-remove.md

File metadata and controls

172 lines (141 loc) · 3.7 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:netfw.INetFwOpenPorts.Remove
INetFwOpenPorts::Remove (netfw.h)
Closes a port and removes it from the collection.
INetFwOpenPorts interface [ICS/ICF]
Remove method
INetFwOpenPorts.Remove
INetFwOpenPorts::Remove
Remove
Remove method [ICS/ICF]
Remove method [ICS/ICF]
INetFwOpenPorts interface
ics.inetfwopenports_remove
netfw/INetFwOpenPorts::Remove
ics\inetfwopenports_remove.htm
ics
e3719087-f7b9-4780-a030-0c568248080d
12/05/2018
INetFwOpenPorts interface [ICS/ICF],Remove method, INetFwOpenPorts.Remove, INetFwOpenPorts::Remove, Remove, Remove method [ICS/ICF], Remove method [ICS/ICF],INetFwOpenPorts interface, ics.inetfwopenports_remove, netfw/INetFwOpenPorts::Remove
netfw.h
Windows
Windows Vista, Windows XP with SP2 [desktop apps only]
Windows Server 2003 with SP1 [desktop apps only]
FirewallAPI.dll; Hnetcfg.dll on Windows XP with SP2
Windows
19H1
INetFwOpenPorts::Remove
netfw/INetFwOpenPorts::Remove
c++
APIRef
kbSyntax
COM
FirewallAPI.dll
Hnetcfg.dll
INetFwOpenPorts.Remove

INetFwOpenPorts::Remove

-description

[The Windows Firewall API is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. For Windows Vista and later, use of the Windows Firewall with Advanced Security API is recommended.]

Closes a port and removes it from the collection.

-parameters

-param portNumber [in]

Port number to remove.

-param ipProtocol [in]

Protocol of the port to remove.

-returns

C++

Return code Description
E_ACCESSDENIED
The operation was aborted due to permissions issues.
E_INVALIDARG
The method failed due to an invalid parameter.
E_OUTOFMEMORY
The method was unable to allocate required memory.
 

VB

If the method succeeds, the return value is S_OK.

If the method fails, the return value is one of the following error codes.

Return code Description
E_ACCESSDENIED
The operation was aborted due to permissions issues.
E_INVALIDARG
The method failed due to an invalid parameter.
E_OUTOFMEMORY
The method was unable to allocate required memory.

-remarks

If the port is already closed ,the Remove method has no effect.

-see-also

INetFwOpenPort

INetFwOpenPorts

NET_FW_IP_PROTOCOL