PfCreateInterface

C# Signature:

[DllImport("Iphlpapi.dll", EntryPoint = "PfCreateInterface")]
    static extern Int32 PfCreateInterface(int dwName, uint inAction, uint outAction, int bUseLog, int bMustBeUnique, ref IntPtr ppInterface);

VB Signature:

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

Notes:

/// <summary>
    /// The PfCreateInterface function creates a new filter interface. Use this interface to control the adding and deleting of filters to and from adapters.
    /// </summary>
    /// <param name="dwName">[in] Specifies the interface name. A zero value specifies a new, unique interface. Any other value is a potentially shared interface. 
    /// The bMustBeUnique parameter can turn a shared interface into a unique one. However, using bMustBeUnique in this way can cause the function to fail.</param>
    /// <param name="inAction">[in] Specifies a default action for an input packet. This member can be one of the following values.</param>
    /// <param name="outAction">[in] Specifies a default action for an output packet. This member can be one of the following values.</param>
    /// <param name="bUseLog">[in] Specifies whether to bind the log to this interface. If this member is TRUE, the log is bound to this interface.</param>
    /// <param name="bMustBeUnique">[in] Specifies whether the interface is unique or shared. If this member is TRUE, this interface is unique, that is, it cannot be shared.</param>
    /// <param name="ppInterface">[out] Pointer to a pointer that, on successful return, points to an interface handle to use with subsequent function calls.</param>
    /// <returns>If the function succeeds, the return value is NO_ERROR.</returns>

Sample Code:

Última actualización