Win32 API 日本語リファレンス
ホームSecurity.Cryptography › BCryptUnregisterConfigChangeNotify

BCryptUnregisterConfigChangeNotify

関数
CNG構成変更通知のイベント登録を解除する。
DLLbcrypt.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

NTSTATUS BCryptUnregisterConfigChangeNotify(
    HANDLE hEvent
);

パラメーター

名前方向
hEventHANDLEin

戻り値の型: NTSTATUS

各言語での呼び出し定義

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

NTSTATUS BCryptUnregisterConfigChangeNotify(
    HANDLE hEvent
);
[DllImport("bcrypt.dll", ExactSpelling = true)]
static extern int BCryptUnregisterConfigChangeNotify(
    IntPtr hEvent   // HANDLE
);
<DllImport("bcrypt.dll", ExactSpelling:=True)>
Public Shared Function BCryptUnregisterConfigChangeNotify(
    hEvent As IntPtr   ' HANDLE
) As Integer
End Function
' hEvent : HANDLE
Declare PtrSafe Function BCryptUnregisterConfigChangeNotify Lib "bcrypt" ( _
    ByVal hEvent As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

BCryptUnregisterConfigChangeNotify = ctypes.windll.bcrypt.BCryptUnregisterConfigChangeNotify
BCryptUnregisterConfigChangeNotify.restype = ctypes.c_int
BCryptUnregisterConfigChangeNotify.argtypes = [
    wintypes.HANDLE,  # hEvent : HANDLE
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('bcrypt.dll')
BCryptUnregisterConfigChangeNotify = Fiddle::Function.new(
  lib['BCryptUnregisterConfigChangeNotify'],
  [
    Fiddle::TYPE_VOIDP,  # hEvent : HANDLE
  ],
  Fiddle::TYPE_INT)
#[link(name = "bcrypt")]
extern "system" {
    fn BCryptUnregisterConfigChangeNotify(
        hEvent: *mut core::ffi::c_void  // HANDLE
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("bcrypt.dll")]
public static extern int BCryptUnregisterConfigChangeNotify(IntPtr hEvent);
"@
$api = Add-Type -MemberDefinition $sig -Name 'bcrypt_BCryptUnregisterConfigChangeNotify' -Namespace Win32 -PassThru
# $api::BCryptUnregisterConfigChangeNotify(hEvent)
#uselib "bcrypt.dll"
#func global BCryptUnregisterConfigChangeNotify "BCryptUnregisterConfigChangeNotify" sptr
; BCryptUnregisterConfigChangeNotify hEvent   ; 戻り値は stat
; hEvent : HANDLE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "bcrypt.dll"
#cfunc global BCryptUnregisterConfigChangeNotify "BCryptUnregisterConfigChangeNotify" sptr
; res = BCryptUnregisterConfigChangeNotify(hEvent)
; hEvent : HANDLE -> "sptr"
; NTSTATUS BCryptUnregisterConfigChangeNotify(HANDLE hEvent)
#uselib "bcrypt.dll"
#cfunc global BCryptUnregisterConfigChangeNotify "BCryptUnregisterConfigChangeNotify" intptr
; res = BCryptUnregisterConfigChangeNotify(hEvent)
; hEvent : HANDLE -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	bcrypt = windows.NewLazySystemDLL("bcrypt.dll")
	procBCryptUnregisterConfigChangeNotify = bcrypt.NewProc("BCryptUnregisterConfigChangeNotify")
)

// hEvent (HANDLE)
r1, _, err := procBCryptUnregisterConfigChangeNotify.Call(
	uintptr(hEvent),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // NTSTATUS
function BCryptUnregisterConfigChangeNotify(
  hEvent: THandle   // HANDLE
): Integer; stdcall;
  external 'bcrypt.dll' name 'BCryptUnregisterConfigChangeNotify';
result := DllCall("bcrypt\BCryptUnregisterConfigChangeNotify"
    , "Ptr", hEvent   ; HANDLE
    , "Int")   ; return: NTSTATUS
●BCryptUnregisterConfigChangeNotify(hEvent) = DLL("bcrypt.dll", "int BCryptUnregisterConfigChangeNotify(void*)")
# 呼び出し: BCryptUnregisterConfigChangeNotify(hEvent)
# hEvent : HANDLE -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。