ホーム › NetworkManagement.IpHelper › PfUnBindInterface
PfUnBindInterface
関数パケットフィルタリングインターフェイスのバインドを解除する。
シグネチャ
// IPHLPAPI.dll
#include <windows.h>
DWORD PfUnBindInterface(
void* pInterface
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pInterface | void* | inout |
戻り値の型: DWORD
各言語での呼び出し定義
// IPHLPAPI.dll
#include <windows.h>
DWORD PfUnBindInterface(
void* pInterface
);[DllImport("IPHLPAPI.dll", ExactSpelling = true)]
static extern uint PfUnBindInterface(
IntPtr pInterface // void* in/out
);<DllImport("IPHLPAPI.dll", ExactSpelling:=True)>
Public Shared Function PfUnBindInterface(
pInterface As IntPtr ' void* in/out
) As UInteger
End Function' pInterface : void* in/out
Declare PtrSafe Function PfUnBindInterface Lib "iphlpapi" ( _
ByVal pInterface As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
PfUnBindInterface = ctypes.windll.iphlpapi.PfUnBindInterface
PfUnBindInterface.restype = wintypes.DWORD
PfUnBindInterface.argtypes = [
ctypes.POINTER(None), # pInterface : void* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('IPHLPAPI.dll')
PfUnBindInterface = Fiddle::Function.new(
lib['PfUnBindInterface'],
[
Fiddle::TYPE_VOIDP, # pInterface : void* in/out
],
-Fiddle::TYPE_INT)#[link(name = "iphlpapi")]
extern "system" {
fn PfUnBindInterface(
pInterface: *mut () // void* in/out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("IPHLPAPI.dll")]
public static extern uint PfUnBindInterface(IntPtr pInterface);
"@
$api = Add-Type -MemberDefinition $sig -Name 'IPHLPAPI_PfUnBindInterface' -Namespace Win32 -PassThru
# $api::PfUnBindInterface(pInterface)#uselib "IPHLPAPI.dll"
#func global PfUnBindInterface "PfUnBindInterface" sptr
; PfUnBindInterface pInterface ; 戻り値は stat
; pInterface : void* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "IPHLPAPI.dll"
#cfunc global PfUnBindInterface "PfUnBindInterface" sptr
; res = PfUnBindInterface(pInterface)
; pInterface : void* in/out -> "sptr"; DWORD PfUnBindInterface(void* pInterface)
#uselib "IPHLPAPI.dll"
#cfunc global PfUnBindInterface "PfUnBindInterface" intptr
; res = PfUnBindInterface(pInterface)
; pInterface : void* in/out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
iphlpapi = windows.NewLazySystemDLL("IPHLPAPI.dll")
procPfUnBindInterface = iphlpapi.NewProc("PfUnBindInterface")
)
// pInterface (void* in/out)
r1, _, err := procPfUnBindInterface.Call(
uintptr(pInterface),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction PfUnBindInterface(
pInterface: Pointer // void* in/out
): DWORD; stdcall;
external 'IPHLPAPI.dll' name 'PfUnBindInterface';result := DllCall("IPHLPAPI\PfUnBindInterface"
, "Ptr", pInterface ; void* in/out
, "UInt") ; return: DWORD●PfUnBindInterface(pInterface) = DLL("IPHLPAPI.dll", "dword PfUnBindInterface(void*)")
# 呼び出し: PfUnBindInterface(pInterface)
# pInterface : void* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。