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

RemoveClusterGroupToGroupSetDependency

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

シグネチャ

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

DWORD RemoveClusterGroupToGroupSetDependency(
    HGROUP hGroup,
    HGROUPSET hDependsOn
);

パラメーター

名前方向
hGroupHGROUPin
hDependsOnHGROUPSETin

戻り値の型: DWORD

各言語での呼び出し定義

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

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

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

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

var (
	clusapi = windows.NewLazySystemDLL("CLUSAPI.dll")
	procRemoveClusterGroupToGroupSetDependency = clusapi.NewProc("RemoveClusterGroupToGroupSetDependency")
)

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