RemoveStaticFilter

Since 3.6.1

Available since: Windows Packet Filter 3.6.1

The RemoveStaticFilter function deletes a static filter rule from the active static filter table by its zero-based index.

Syntax

BOOL WINAPI RemoveStaticFilter(
    _In_ HANDLE hOpen,
    _In_ DWORD  dwFilterId
);

Parameters

hOpen
[in] Opaque library-object handle returned by OpenFilterDriver.

dwFilterId
[in] Zero-based index of the filter to remove from the driver’s active static filter table.

Return Value

Returns TRUE if the filter was successfully removed; returns FALSE if the driver request did not succeed.

Remarks

This function sends IOCTL_NDISRD_REMOVE_FILTER_BY_INDEX with the target filter index. Treat the argument as a current table position, not a stable filter identifier. Query the table again after changing it if subsequent operations depend on rule positions.

See Also

ResetPacketFilterTable, InsertStaticFilter, AddStaticFilterFront

Native SDK 3.6.2: The implementation forwards the DWORD argument through IOCTL_NDISRD_REMOVE_FILTER_BY_INDEX. It does not implement a separate delete-by-unique-ID operation. See the pinned implementation.