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