Win32 API 日本語リファレンス
ホームNetworkManagement.IpHelper › DeleteProxyArpEntry

DeleteProxyArpEntry

関数
指定したプロキシARPエントリを削除する。
DLLIPHLPAPI.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

// IPHLPAPI.dll
#include <windows.h>

DWORD DeleteProxyArpEntry(
    DWORD dwAddress,
    DWORD dwMask,
    DWORD dwIfIndex
);

パラメーター

名前方向
dwAddressDWORDin
dwMaskDWORDin
dwIfIndexDWORDin

戻り値の型: DWORD

各言語での呼び出し定義

// IPHLPAPI.dll
#include <windows.h>

DWORD DeleteProxyArpEntry(
    DWORD dwAddress,
    DWORD dwMask,
    DWORD dwIfIndex
);
[DllImport("IPHLPAPI.dll", ExactSpelling = true)]
static extern uint DeleteProxyArpEntry(
    uint dwAddress,   // DWORD
    uint dwMask,   // DWORD
    uint dwIfIndex   // DWORD
);
<DllImport("IPHLPAPI.dll", ExactSpelling:=True)>
Public Shared Function DeleteProxyArpEntry(
    dwAddress As UInteger,   ' DWORD
    dwMask As UInteger,   ' DWORD
    dwIfIndex As UInteger   ' DWORD
) As UInteger
End Function
' dwAddress : DWORD
' dwMask : DWORD
' dwIfIndex : DWORD
Declare PtrSafe Function DeleteProxyArpEntry Lib "iphlpapi" ( _
    ByVal dwAddress As Long, _
    ByVal dwMask As Long, _
    ByVal dwIfIndex As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

DeleteProxyArpEntry = ctypes.windll.iphlpapi.DeleteProxyArpEntry
DeleteProxyArpEntry.restype = wintypes.DWORD
DeleteProxyArpEntry.argtypes = [
    wintypes.DWORD,  # dwAddress : DWORD
    wintypes.DWORD,  # dwMask : DWORD
    wintypes.DWORD,  # dwIfIndex : DWORD
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('IPHLPAPI.dll')
DeleteProxyArpEntry = Fiddle::Function.new(
  lib['DeleteProxyArpEntry'],
  [
    -Fiddle::TYPE_INT,  # dwAddress : DWORD
    -Fiddle::TYPE_INT,  # dwMask : DWORD
    -Fiddle::TYPE_INT,  # dwIfIndex : DWORD
  ],
  -Fiddle::TYPE_INT)
#[link(name = "iphlpapi")]
extern "system" {
    fn DeleteProxyArpEntry(
        dwAddress: u32,  // DWORD
        dwMask: u32,  // DWORD
        dwIfIndex: u32  // DWORD
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("IPHLPAPI.dll")]
public static extern uint DeleteProxyArpEntry(uint dwAddress, uint dwMask, uint dwIfIndex);
"@
$api = Add-Type -MemberDefinition $sig -Name 'IPHLPAPI_DeleteProxyArpEntry' -Namespace Win32 -PassThru
# $api::DeleteProxyArpEntry(dwAddress, dwMask, dwIfIndex)
#uselib "IPHLPAPI.dll"
#func global DeleteProxyArpEntry "DeleteProxyArpEntry" sptr, sptr, sptr
; DeleteProxyArpEntry dwAddress, dwMask, dwIfIndex   ; 戻り値は stat
; dwAddress : DWORD -> "sptr"
; dwMask : DWORD -> "sptr"
; dwIfIndex : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "IPHLPAPI.dll"
#cfunc global DeleteProxyArpEntry "DeleteProxyArpEntry" int, int, int
; res = DeleteProxyArpEntry(dwAddress, dwMask, dwIfIndex)
; dwAddress : DWORD -> "int"
; dwMask : DWORD -> "int"
; dwIfIndex : DWORD -> "int"
; DWORD DeleteProxyArpEntry(DWORD dwAddress, DWORD dwMask, DWORD dwIfIndex)
#uselib "IPHLPAPI.dll"
#cfunc global DeleteProxyArpEntry "DeleteProxyArpEntry" int, int, int
; res = DeleteProxyArpEntry(dwAddress, dwMask, dwIfIndex)
; dwAddress : DWORD -> "int"
; dwMask : DWORD -> "int"
; dwIfIndex : DWORD -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	iphlpapi = windows.NewLazySystemDLL("IPHLPAPI.dll")
	procDeleteProxyArpEntry = iphlpapi.NewProc("DeleteProxyArpEntry")
)

// dwAddress (DWORD), dwMask (DWORD), dwIfIndex (DWORD)
r1, _, err := procDeleteProxyArpEntry.Call(
	uintptr(dwAddress),
	uintptr(dwMask),
	uintptr(dwIfIndex),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function DeleteProxyArpEntry(
  dwAddress: DWORD;   // DWORD
  dwMask: DWORD;   // DWORD
  dwIfIndex: DWORD   // DWORD
): DWORD; stdcall;
  external 'IPHLPAPI.dll' name 'DeleteProxyArpEntry';
result := DllCall("IPHLPAPI\DeleteProxyArpEntry"
    , "UInt", dwAddress   ; DWORD
    , "UInt", dwMask   ; DWORD
    , "UInt", dwIfIndex   ; DWORD
    , "UInt")   ; return: DWORD
●DeleteProxyArpEntry(dwAddress, dwMask, dwIfIndex) = DLL("IPHLPAPI.dll", "dword DeleteProxyArpEntry(dword, dword, dword)")
# 呼び出し: DeleteProxyArpEntry(dwAddress, dwMask, dwIfIndex)
# dwAddress : DWORD -> "dword"
# dwMask : DWORD -> "dword"
# dwIfIndex : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。