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