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

RemoveClusterGroupSetDependency

関数
グループセット間の依存関係を削除する。
DLLCLUSAPI.dll呼出規約winapi対応OSwindowsserver2016

シグネチャ

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

DWORD RemoveClusterGroupSetDependency(
    HGROUPSET hGroupSet,
    HGROUPSET hDependsOn
);

パラメーター

名前方向
hGroupSetHGROUPSETin
hDependsOnHGROUPSETin

戻り値の型: DWORD

各言語での呼び出し定義

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

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

RemoveClusterGroupSetDependency = ctypes.windll.clusapi.RemoveClusterGroupSetDependency
RemoveClusterGroupSetDependency.restype = wintypes.DWORD
RemoveClusterGroupSetDependency.argtypes = [
    ctypes.c_ssize_t,  # hGroupSet : HGROUPSET
    ctypes.c_ssize_t,  # hDependsOn : HGROUPSET
]
require 'fiddle'
require 'fiddle/import'

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

var (
	clusapi = windows.NewLazySystemDLL("CLUSAPI.dll")
	procRemoveClusterGroupSetDependency = clusapi.NewProc("RemoveClusterGroupSetDependency")
)

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