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