ホーム › NetworkManagement.IpHelper › CancelIPChangeNotify
CancelIPChangeNotify
関数IPアドレスや経路変更の通知登録を解除する。
シグネチャ
// IPHLPAPI.dll
#include <windows.h>
BOOL CancelIPChangeNotify(
OVERLAPPED* notifyOverlapped
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| notifyOverlapped | OVERLAPPED* | in |
戻り値の型: BOOL
各言語での呼び出し定義
// IPHLPAPI.dll
#include <windows.h>
BOOL CancelIPChangeNotify(
OVERLAPPED* notifyOverlapped
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("IPHLPAPI.dll", ExactSpelling = true)]
static extern bool CancelIPChangeNotify(
IntPtr notifyOverlapped // OVERLAPPED*
);<DllImport("IPHLPAPI.dll", ExactSpelling:=True)>
Public Shared Function CancelIPChangeNotify(
notifyOverlapped As IntPtr ' OVERLAPPED*
) As Boolean
End Function' notifyOverlapped : OVERLAPPED*
Declare PtrSafe Function CancelIPChangeNotify Lib "iphlpapi" ( _
ByVal notifyOverlapped As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
CancelIPChangeNotify = ctypes.windll.iphlpapi.CancelIPChangeNotify
CancelIPChangeNotify.restype = wintypes.BOOL
CancelIPChangeNotify.argtypes = [
ctypes.c_void_p, # notifyOverlapped : OVERLAPPED*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('IPHLPAPI.dll')
CancelIPChangeNotify = Fiddle::Function.new(
lib['CancelIPChangeNotify'],
[
Fiddle::TYPE_VOIDP, # notifyOverlapped : OVERLAPPED*
],
Fiddle::TYPE_INT)#[link(name = "iphlpapi")]
extern "system" {
fn CancelIPChangeNotify(
notifyOverlapped: *mut OVERLAPPED // OVERLAPPED*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("IPHLPAPI.dll")]
public static extern bool CancelIPChangeNotify(IntPtr notifyOverlapped);
"@
$api = Add-Type -MemberDefinition $sig -Name 'IPHLPAPI_CancelIPChangeNotify' -Namespace Win32 -PassThru
# $api::CancelIPChangeNotify(notifyOverlapped)#uselib "IPHLPAPI.dll"
#func global CancelIPChangeNotify "CancelIPChangeNotify" sptr
; CancelIPChangeNotify varptr(notifyOverlapped) ; 戻り値は stat
; notifyOverlapped : OVERLAPPED* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "IPHLPAPI.dll" #cfunc global CancelIPChangeNotify "CancelIPChangeNotify" var ; res = CancelIPChangeNotify(notifyOverlapped) ; notifyOverlapped : OVERLAPPED* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "IPHLPAPI.dll" #cfunc global CancelIPChangeNotify "CancelIPChangeNotify" sptr ; res = CancelIPChangeNotify(varptr(notifyOverlapped)) ; notifyOverlapped : OVERLAPPED* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; BOOL CancelIPChangeNotify(OVERLAPPED* notifyOverlapped) #uselib "IPHLPAPI.dll" #cfunc global CancelIPChangeNotify "CancelIPChangeNotify" var ; res = CancelIPChangeNotify(notifyOverlapped) ; notifyOverlapped : OVERLAPPED* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; BOOL CancelIPChangeNotify(OVERLAPPED* notifyOverlapped) #uselib "IPHLPAPI.dll" #cfunc global CancelIPChangeNotify "CancelIPChangeNotify" intptr ; res = CancelIPChangeNotify(varptr(notifyOverlapped)) ; notifyOverlapped : OVERLAPPED* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
iphlpapi = windows.NewLazySystemDLL("IPHLPAPI.dll")
procCancelIPChangeNotify = iphlpapi.NewProc("CancelIPChangeNotify")
)
// notifyOverlapped (OVERLAPPED*)
r1, _, err := procCancelIPChangeNotify.Call(
uintptr(notifyOverlapped),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction CancelIPChangeNotify(
notifyOverlapped: Pointer // OVERLAPPED*
): BOOL; stdcall;
external 'IPHLPAPI.dll' name 'CancelIPChangeNotify';result := DllCall("IPHLPAPI\CancelIPChangeNotify"
, "Ptr", notifyOverlapped ; OVERLAPPED*
, "Int") ; return: BOOL●CancelIPChangeNotify(notifyOverlapped) = DLL("IPHLPAPI.dll", "bool CancelIPChangeNotify(void*)")
# 呼び出し: CancelIPChangeNotify(notifyOverlapped)
# notifyOverlapped : OVERLAPPED* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。