PfBindInterfaceToIPAddress

C# Signature:

[DllImport("iphlpapi.dll", EntryPoint = "PfBindInterfaceToIPAddress")]
    static extern uint PfBindInterfaceToIPAddress(IntPtr Interface_handle, uint pfatType, ref uint IPAddress);

VB Signature:

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

Notes:

/// <summary>
    /// The PfBindInterfaceToIPAddress function associates an interface with the IP stack index having the specified address.
    /// </summary>
    /// <param name="Interface_handle">[in] Specifies a handle to the interface to associate with the IP stack index.</param>
    /// <param name="pfatType">[in] Specifies the address type for the interface. This parameter is of type PFADDRESSTYPE. </param>
    /// <param name="IPAddress">[in] Pointer to an array of bytes that specifies the IP address for the interface.</param>
    /// <returns>If the function succeeds, the return value is NO_ERROR.</returns>

Sample Code:

using System;
    using System.Collections.Generic;
    using System.Net;
    using System.Runtime.InteropServices;
    using Microsoft.Win32;

Sample Code:

Última actualización