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