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