Win32 API 日本語リファレンス
ホームNetworking.Clustering › ClusterRegBatchCloseNotification

ClusterRegBatchCloseNotification

関数
クラスタレジストリバッチ通知ハンドルを閉じる。
DLLCLUSAPI.dll呼出規約winapi対応OSwindowsserver2008

シグネチャ

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

INT ClusterRegBatchCloseNotification(
    HREGBATCHNOTIFICATION hBatchNotification
);

パラメーター

名前方向
hBatchNotificationHREGBATCHNOTIFICATIONin

戻り値の型: INT

各言語での呼び出し定義

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

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

ClusterRegBatchCloseNotification = ctypes.windll.clusapi.ClusterRegBatchCloseNotification
ClusterRegBatchCloseNotification.restype = ctypes.c_int
ClusterRegBatchCloseNotification.argtypes = [
    ctypes.c_ssize_t,  # hBatchNotification : HREGBATCHNOTIFICATION
]
require 'fiddle'
require 'fiddle/import'

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

var (
	clusapi = windows.NewLazySystemDLL("CLUSAPI.dll")
	procClusterRegBatchCloseNotification = clusapi.NewProc("ClusterRegBatchCloseNotification")
)

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