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