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