Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy
PfRemoveFiltersFromInterface (iphlpapi)
 
.
Summary
The PfRemoveFiltersFromInterface function removes the specified filters from the interface.

C# Signature:

    [DllImport("iphlpapi.dll", EntryPoint = "PfRemoveFiltersFromInterface")]
    static extern uint PfRemoveFiltersFromInterface(IntPtr ih, uint cInFilters,
    [MarshalAsAttribute(UnmanagedType.Struct)] ref PPF_FILTER_DESCRIPTOR pfiltIn, uint cOutFilters,
    [MarshalAsAttribute(UnmanagedType.Struct)] ref PPF_FILTER_DESCRIPTOR pfiltOut);

VB Signature:

Declare Function PfRemoveFiltersFromInterface Lib "iphlpapi.dll" (TODO) As TODO

User-Defined Types:

    internal enum PFADDRESSTYPE : uint
    {
        PF_IPV4,
        PF_IPV6
    }

    public enum FILTER_FLAGS : uint
    {
        FD_FLAGS = 0x1
    }

    public enum PROTOCOL : uint
    {
        ANY = 0x00,
        ICMP = 0x01,
        TCP = 0x06,
        UDP = 0x11
    }

    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    internal unsafe struct PPF_FILTER_DESCRIPTOR
    {
        public FILTER_FLAGS dwFilterFlags;
        public UInt32 dwRule;
        public PFADDRESSTYPE pfatType;

        public UInt32* SrcAddr;
        public UInt32* SrcMask;
        public UInt32* DstAddr;
        public UInt32* DstMask;

        public PROTOCOL dwProtocol;
        public UInt32 fLateBound;
        public UInt16 wSrcPort;
        public UInt16 wDstPort;
        public UInt16 wSrcPortHighRange;
        public UInt16 wDstPortHighRange;
    }

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

    /// <summary>
    /// The PfRemoveFiltersFromInterface function removes the specified filters from the interface.
    /// </summary>
    /// <param name="ih">[in] Handle to the interface.</param>
    /// <param name="cInFilters">[in] Specifies the number of input filter descriptions pointed to by the pfiltIn parameter.</param>
    /// <param name="pfiltIn">[in] Pointer to an array of filter descriptions to use as input filters.</param>
    /// <param name="cOutFilters">[in] Specifies the number of output filters descriptions pointed to by the pfiltOut parameter.</param>
    /// <param name="pfiltOut">[in] Pointer to an array of filter descriptions to use as output filters.</param>
    /// <returns>If the function succeeds, the return value is NO_ERROR.</returns>

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions