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