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