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

RemoveClusterGroupDependency

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

シグネチャ

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

DWORD RemoveClusterGroupDependency(
    HGROUP hGroup,
    HGROUP hDependsOn
);

パラメーター

名前方向
hGroupHGROUPin
hDependsOnHGROUPin

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD RemoveClusterGroupDependency(
    HGROUP hGroup,
    HGROUP hDependsOn
);
[DllImport("CLUSAPI.dll", ExactSpelling = true)]
static extern uint RemoveClusterGroupDependency(
    IntPtr hGroup,   // HGROUP
    IntPtr hDependsOn   // HGROUP
);
<DllImport("CLUSAPI.dll", ExactSpelling:=True)>
Public Shared Function RemoveClusterGroupDependency(
    hGroup As IntPtr,   ' HGROUP
    hDependsOn As IntPtr   ' HGROUP
) As UInteger
End Function
' hGroup : HGROUP
' hDependsOn : HGROUP
Declare PtrSafe Function RemoveClusterGroupDependency Lib "clusapi" ( _
    ByVal hGroup 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

RemoveClusterGroupDependency = ctypes.windll.clusapi.RemoveClusterGroupDependency
RemoveClusterGroupDependency.restype = wintypes.DWORD
RemoveClusterGroupDependency.argtypes = [
    ctypes.c_ssize_t,  # hGroup : HGROUP
    ctypes.c_ssize_t,  # hDependsOn : HGROUP
]
require 'fiddle'
require 'fiddle/import'

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

var (
	clusapi = windows.NewLazySystemDLL("CLUSAPI.dll")
	procRemoveClusterGroupDependency = clusapi.NewProc("RemoveClusterGroupDependency")
)

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