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