ホーム › Networking.Clustering › ResUtilGetProperties
ResUtilGetProperties
関数プロパティテーブルに基づき値をプロパティリストとして取得する。
シグネチャ
// RESUTILS.dll
#include <windows.h>
DWORD ResUtilGetProperties(
HKEY hkeyClusterKey,
const RESUTIL_PROPERTY_ITEM* pPropertyTable,
void* pOutPropertyList,
DWORD cbOutPropertyListSize,
DWORD* pcbBytesReturned,
DWORD* pcbRequired
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| hkeyClusterKey | HKEY | in | プロパティを取得する対象のクラスターレジストリキー。 |
| pPropertyTable | RESUTIL_PROPERTY_ITEM* | in | 取得対象のプロパティ定義を記述したRESUTIL_PROPERTY_ITEM配列。 |
| pOutPropertyList | void* | out | 取得したプロパティリストを受け取る出力バッファ。 |
| cbOutPropertyListSize | DWORD | in | pOutPropertyListのサイズ(バイト)。 |
| pcbBytesReturned | DWORD* | out | 出力に書き込まれた実バイト数を受け取るDWORDポインタ。 |
| pcbRequired | DWORD* | out | 必要なバッファのバイト数を受け取るDWORDポインタ。 |
戻り値の型: DWORD
各言語での呼び出し定義
// RESUTILS.dll
#include <windows.h>
DWORD ResUtilGetProperties(
HKEY hkeyClusterKey,
const RESUTIL_PROPERTY_ITEM* pPropertyTable,
void* pOutPropertyList,
DWORD cbOutPropertyListSize,
DWORD* pcbBytesReturned,
DWORD* pcbRequired
);[DllImport("RESUTILS.dll", ExactSpelling = true)]
static extern uint ResUtilGetProperties(
IntPtr hkeyClusterKey, // HKEY
IntPtr pPropertyTable, // RESUTIL_PROPERTY_ITEM*
IntPtr pOutPropertyList, // void* out
uint cbOutPropertyListSize, // DWORD
out uint pcbBytesReturned, // DWORD* out
out uint pcbRequired // DWORD* out
);<DllImport("RESUTILS.dll", ExactSpelling:=True)>
Public Shared Function ResUtilGetProperties(
hkeyClusterKey As IntPtr, ' HKEY
pPropertyTable As IntPtr, ' RESUTIL_PROPERTY_ITEM*
pOutPropertyList As IntPtr, ' void* out
cbOutPropertyListSize As UInteger, ' DWORD
<Out> ByRef pcbBytesReturned As UInteger, ' DWORD* out
<Out> ByRef pcbRequired As UInteger ' DWORD* out
) As UInteger
End Function' hkeyClusterKey : HKEY
' pPropertyTable : RESUTIL_PROPERTY_ITEM*
' pOutPropertyList : void* out
' cbOutPropertyListSize : DWORD
' pcbBytesReturned : DWORD* out
' pcbRequired : DWORD* out
Declare PtrSafe Function ResUtilGetProperties Lib "resutils" ( _
ByVal hkeyClusterKey As LongPtr, _
ByVal pPropertyTable As LongPtr, _
ByVal pOutPropertyList As LongPtr, _
ByVal cbOutPropertyListSize As Long, _
ByRef pcbBytesReturned As Long, _
ByRef pcbRequired As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ResUtilGetProperties = ctypes.windll.resutils.ResUtilGetProperties
ResUtilGetProperties.restype = wintypes.DWORD
ResUtilGetProperties.argtypes = [
wintypes.HANDLE, # hkeyClusterKey : HKEY
ctypes.c_void_p, # pPropertyTable : RESUTIL_PROPERTY_ITEM*
ctypes.POINTER(None), # pOutPropertyList : void* out
wintypes.DWORD, # cbOutPropertyListSize : DWORD
ctypes.POINTER(wintypes.DWORD), # pcbBytesReturned : DWORD* out
ctypes.POINTER(wintypes.DWORD), # pcbRequired : DWORD* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RESUTILS.dll')
ResUtilGetProperties = Fiddle::Function.new(
lib['ResUtilGetProperties'],
[
Fiddle::TYPE_VOIDP, # hkeyClusterKey : HKEY
Fiddle::TYPE_VOIDP, # pPropertyTable : RESUTIL_PROPERTY_ITEM*
Fiddle::TYPE_VOIDP, # pOutPropertyList : void* out
-Fiddle::TYPE_INT, # cbOutPropertyListSize : DWORD
Fiddle::TYPE_VOIDP, # pcbBytesReturned : DWORD* out
Fiddle::TYPE_VOIDP, # pcbRequired : DWORD* out
],
-Fiddle::TYPE_INT)#[link(name = "resutils")]
extern "system" {
fn ResUtilGetProperties(
hkeyClusterKey: *mut core::ffi::c_void, // HKEY
pPropertyTable: *const RESUTIL_PROPERTY_ITEM, // RESUTIL_PROPERTY_ITEM*
pOutPropertyList: *mut (), // void* out
cbOutPropertyListSize: u32, // DWORD
pcbBytesReturned: *mut u32, // DWORD* out
pcbRequired: *mut u32 // DWORD* out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RESUTILS.dll")]
public static extern uint ResUtilGetProperties(IntPtr hkeyClusterKey, IntPtr pPropertyTable, IntPtr pOutPropertyList, uint cbOutPropertyListSize, out uint pcbBytesReturned, out uint pcbRequired);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RESUTILS_ResUtilGetProperties' -Namespace Win32 -PassThru
# $api::ResUtilGetProperties(hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired)#uselib "RESUTILS.dll"
#func global ResUtilGetProperties "ResUtilGetProperties" sptr, sptr, sptr, sptr, sptr, sptr
; ResUtilGetProperties hkeyClusterKey, varptr(pPropertyTable), pOutPropertyList, cbOutPropertyListSize, varptr(pcbBytesReturned), varptr(pcbRequired) ; 戻り値は stat
; hkeyClusterKey : HKEY -> "sptr"
; pPropertyTable : RESUTIL_PROPERTY_ITEM* -> "sptr"
; pOutPropertyList : void* out -> "sptr"
; cbOutPropertyListSize : DWORD -> "sptr"
; pcbBytesReturned : DWORD* out -> "sptr"
; pcbRequired : DWORD* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "RESUTILS.dll" #cfunc global ResUtilGetProperties "ResUtilGetProperties" sptr, var, sptr, int, var, var ; res = ResUtilGetProperties(hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired) ; hkeyClusterKey : HKEY -> "sptr" ; pPropertyTable : RESUTIL_PROPERTY_ITEM* -> "var" ; pOutPropertyList : void* out -> "sptr" ; cbOutPropertyListSize : DWORD -> "int" ; pcbBytesReturned : DWORD* out -> "var" ; pcbRequired : DWORD* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "RESUTILS.dll" #cfunc global ResUtilGetProperties "ResUtilGetProperties" sptr, sptr, sptr, int, sptr, sptr ; res = ResUtilGetProperties(hkeyClusterKey, varptr(pPropertyTable), pOutPropertyList, cbOutPropertyListSize, varptr(pcbBytesReturned), varptr(pcbRequired)) ; hkeyClusterKey : HKEY -> "sptr" ; pPropertyTable : RESUTIL_PROPERTY_ITEM* -> "sptr" ; pOutPropertyList : void* out -> "sptr" ; cbOutPropertyListSize : DWORD -> "int" ; pcbBytesReturned : DWORD* out -> "sptr" ; pcbRequired : DWORD* out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD ResUtilGetProperties(HKEY hkeyClusterKey, RESUTIL_PROPERTY_ITEM* pPropertyTable, void* pOutPropertyList, DWORD cbOutPropertyListSize, DWORD* pcbBytesReturned, DWORD* pcbRequired) #uselib "RESUTILS.dll" #cfunc global ResUtilGetProperties "ResUtilGetProperties" intptr, var, intptr, int, var, var ; res = ResUtilGetProperties(hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired) ; hkeyClusterKey : HKEY -> "intptr" ; pPropertyTable : RESUTIL_PROPERTY_ITEM* -> "var" ; pOutPropertyList : void* out -> "intptr" ; cbOutPropertyListSize : DWORD -> "int" ; pcbBytesReturned : DWORD* out -> "var" ; pcbRequired : DWORD* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD ResUtilGetProperties(HKEY hkeyClusterKey, RESUTIL_PROPERTY_ITEM* pPropertyTable, void* pOutPropertyList, DWORD cbOutPropertyListSize, DWORD* pcbBytesReturned, DWORD* pcbRequired) #uselib "RESUTILS.dll" #cfunc global ResUtilGetProperties "ResUtilGetProperties" intptr, intptr, intptr, int, intptr, intptr ; res = ResUtilGetProperties(hkeyClusterKey, varptr(pPropertyTable), pOutPropertyList, cbOutPropertyListSize, varptr(pcbBytesReturned), varptr(pcbRequired)) ; hkeyClusterKey : HKEY -> "intptr" ; pPropertyTable : RESUTIL_PROPERTY_ITEM* -> "intptr" ; pOutPropertyList : void* out -> "intptr" ; cbOutPropertyListSize : DWORD -> "int" ; pcbBytesReturned : DWORD* out -> "intptr" ; pcbRequired : DWORD* out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
resutils = windows.NewLazySystemDLL("RESUTILS.dll")
procResUtilGetProperties = resutils.NewProc("ResUtilGetProperties")
)
// hkeyClusterKey (HKEY), pPropertyTable (RESUTIL_PROPERTY_ITEM*), pOutPropertyList (void* out), cbOutPropertyListSize (DWORD), pcbBytesReturned (DWORD* out), pcbRequired (DWORD* out)
r1, _, err := procResUtilGetProperties.Call(
uintptr(hkeyClusterKey),
uintptr(pPropertyTable),
uintptr(pOutPropertyList),
uintptr(cbOutPropertyListSize),
uintptr(pcbBytesReturned),
uintptr(pcbRequired),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction ResUtilGetProperties(
hkeyClusterKey: THandle; // HKEY
pPropertyTable: Pointer; // RESUTIL_PROPERTY_ITEM*
pOutPropertyList: Pointer; // void* out
cbOutPropertyListSize: DWORD; // DWORD
pcbBytesReturned: Pointer; // DWORD* out
pcbRequired: Pointer // DWORD* out
): DWORD; stdcall;
external 'RESUTILS.dll' name 'ResUtilGetProperties';result := DllCall("RESUTILS\ResUtilGetProperties"
, "Ptr", hkeyClusterKey ; HKEY
, "Ptr", pPropertyTable ; RESUTIL_PROPERTY_ITEM*
, "Ptr", pOutPropertyList ; void* out
, "UInt", cbOutPropertyListSize ; DWORD
, "Ptr", pcbBytesReturned ; DWORD* out
, "Ptr", pcbRequired ; DWORD* out
, "UInt") ; return: DWORD●ResUtilGetProperties(hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired) = DLL("RESUTILS.dll", "dword ResUtilGetProperties(void*, void*, void*, dword, void*, void*)")
# 呼び出し: ResUtilGetProperties(hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired)
# hkeyClusterKey : HKEY -> "void*"
# pPropertyTable : RESUTIL_PROPERTY_ITEM* -> "void*"
# pOutPropertyList : void* out -> "void*"
# cbOutPropertyListSize : DWORD -> "dword"
# pcbBytesReturned : DWORD* out -> "void*"
# pcbRequired : DWORD* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "resutils" fn ResUtilGetProperties(
hkeyClusterKey: ?*anyopaque, // HKEY
pPropertyTable: [*c]RESUTIL_PROPERTY_ITEM, // RESUTIL_PROPERTY_ITEM*
pOutPropertyList: ?*anyopaque, // void* out
cbOutPropertyListSize: u32, // DWORD
pcbBytesReturned: [*c]u32, // DWORD* out
pcbRequired: [*c]u32 // DWORD* out
) callconv(std.os.windows.WINAPI) u32;proc ResUtilGetProperties(
hkeyClusterKey: pointer, # HKEY
pPropertyTable: ptr RESUTIL_PROPERTY_ITEM, # RESUTIL_PROPERTY_ITEM*
pOutPropertyList: pointer, # void* out
cbOutPropertyListSize: uint32, # DWORD
pcbBytesReturned: ptr uint32, # DWORD* out
pcbRequired: ptr uint32 # DWORD* out
): uint32 {.importc: "ResUtilGetProperties", stdcall, dynlib: "RESUTILS.dll".}pragma(lib, "resutils");
extern(Windows)
uint ResUtilGetProperties(
void* hkeyClusterKey, // HKEY
RESUTIL_PROPERTY_ITEM* pPropertyTable, // RESUTIL_PROPERTY_ITEM*
void* pOutPropertyList, // void* out
uint cbOutPropertyListSize, // DWORD
uint* pcbBytesReturned, // DWORD* out
uint* pcbRequired // DWORD* out
);ccall((:ResUtilGetProperties, "RESUTILS.dll"), stdcall, UInt32,
(Ptr{Cvoid}, Ptr{RESUTIL_PROPERTY_ITEM}, Ptr{Cvoid}, UInt32, Ptr{UInt32}, Ptr{UInt32}),
hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired)
# hkeyClusterKey : HKEY -> Ptr{Cvoid}
# pPropertyTable : RESUTIL_PROPERTY_ITEM* -> Ptr{RESUTIL_PROPERTY_ITEM}
# pOutPropertyList : void* out -> Ptr{Cvoid}
# cbOutPropertyListSize : DWORD -> UInt32
# pcbBytesReturned : DWORD* out -> Ptr{UInt32}
# pcbRequired : DWORD* out -> Ptr{UInt32}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
uint32_t ResUtilGetProperties(
void* hkeyClusterKey,
void* pPropertyTable,
void* pOutPropertyList,
uint32_t cbOutPropertyListSize,
uint32_t* pcbBytesReturned,
uint32_t* pcbRequired);
]]
local resutils = ffi.load("resutils")
-- resutils.ResUtilGetProperties(hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired)
-- hkeyClusterKey : HKEY
-- pPropertyTable : RESUTIL_PROPERTY_ITEM*
-- pOutPropertyList : void* out
-- cbOutPropertyListSize : DWORD
-- pcbBytesReturned : DWORD* out
-- pcbRequired : DWORD* out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('RESUTILS.dll');
const ResUtilGetProperties = lib.func('__stdcall', 'ResUtilGetProperties', 'uint32_t', ['void *', 'void *', 'void *', 'uint32_t', 'uint32_t *', 'uint32_t *']);
// ResUtilGetProperties(hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired)
// hkeyClusterKey : HKEY -> 'void *'
// pPropertyTable : RESUTIL_PROPERTY_ITEM* -> 'void *'
// pOutPropertyList : void* out -> 'void *'
// cbOutPropertyListSize : DWORD -> 'uint32_t'
// pcbBytesReturned : DWORD* out -> 'uint32_t *'
// pcbRequired : DWORD* out -> 'uint32_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("RESUTILS.dll", {
ResUtilGetProperties: { parameters: ["pointer", "pointer", "pointer", "u32", "pointer", "pointer"], result: "u32" },
});
// lib.symbols.ResUtilGetProperties(hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired)
// hkeyClusterKey : HKEY -> "pointer"
// pPropertyTable : RESUTIL_PROPERTY_ITEM* -> "pointer"
// pOutPropertyList : void* out -> "pointer"
// cbOutPropertyListSize : DWORD -> "u32"
// pcbBytesReturned : DWORD* out -> "pointer"
// pcbRequired : DWORD* out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
uint32_t ResUtilGetProperties(
void* hkeyClusterKey,
void* pPropertyTable,
void* pOutPropertyList,
uint32_t cbOutPropertyListSize,
uint32_t* pcbBytesReturned,
uint32_t* pcbRequired);
C, "RESUTILS.dll");
// $ffi->ResUtilGetProperties(hkeyClusterKey, pPropertyTable, pOutPropertyList, cbOutPropertyListSize, pcbBytesReturned, pcbRequired);
// hkeyClusterKey : HKEY
// pPropertyTable : RESUTIL_PROPERTY_ITEM*
// pOutPropertyList : void* out
// cbOutPropertyListSize : DWORD
// pcbBytesReturned : DWORD* out
// pcbRequired : DWORD* out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Resutils extends StdCallLibrary {
Resutils INSTANCE = Native.load("resutils", Resutils.class);
int ResUtilGetProperties(
Pointer hkeyClusterKey, // HKEY
Pointer pPropertyTable, // RESUTIL_PROPERTY_ITEM*
Pointer pOutPropertyList, // void* out
int cbOutPropertyListSize, // DWORD
IntByReference pcbBytesReturned, // DWORD* out
IntByReference pcbRequired // DWORD* out
);
}@[Link("resutils")]
lib LibRESUTILS
fun ResUtilGetProperties = ResUtilGetProperties(
hkeyClusterKey : Void*, # HKEY
pPropertyTable : RESUTIL_PROPERTY_ITEM*, # RESUTIL_PROPERTY_ITEM*
pOutPropertyList : Void*, # void* out
cbOutPropertyListSize : UInt32, # DWORD
pcbBytesReturned : UInt32*, # DWORD* out
pcbRequired : UInt32* # DWORD* out
) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef ResUtilGetPropertiesNative = Uint32 Function(Pointer<Void>, Pointer<Void>, Pointer<Void>, Uint32, Pointer<Uint32>, Pointer<Uint32>);
typedef ResUtilGetPropertiesDart = int Function(Pointer<Void>, Pointer<Void>, Pointer<Void>, int, Pointer<Uint32>, Pointer<Uint32>);
final ResUtilGetProperties = DynamicLibrary.open('RESUTILS.dll')
.lookupFunction<ResUtilGetPropertiesNative, ResUtilGetPropertiesDart>('ResUtilGetProperties');
// hkeyClusterKey : HKEY -> Pointer<Void>
// pPropertyTable : RESUTIL_PROPERTY_ITEM* -> Pointer<Void>
// pOutPropertyList : void* out -> Pointer<Void>
// cbOutPropertyListSize : DWORD -> Uint32
// pcbBytesReturned : DWORD* out -> Pointer<Uint32>
// pcbRequired : DWORD* out -> Pointer<Uint32>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function ResUtilGetProperties(
hkeyClusterKey: THandle; // HKEY
pPropertyTable: Pointer; // RESUTIL_PROPERTY_ITEM*
pOutPropertyList: Pointer; // void* out
cbOutPropertyListSize: DWORD; // DWORD
pcbBytesReturned: Pointer; // DWORD* out
pcbRequired: Pointer // DWORD* out
): DWORD; stdcall;
external 'RESUTILS.dll' name 'ResUtilGetProperties';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "ResUtilGetProperties"
c_ResUtilGetProperties :: Ptr () -> Ptr () -> Ptr () -> Word32 -> Ptr Word32 -> Ptr Word32 -> IO Word32
-- hkeyClusterKey : HKEY -> Ptr ()
-- pPropertyTable : RESUTIL_PROPERTY_ITEM* -> Ptr ()
-- pOutPropertyList : void* out -> Ptr ()
-- cbOutPropertyListSize : DWORD -> Word32
-- pcbBytesReturned : DWORD* out -> Ptr Word32
-- pcbRequired : DWORD* out -> Ptr Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let resutilgetproperties =
foreign "ResUtilGetProperties"
((ptr void) @-> (ptr void) @-> (ptr void) @-> uint32_t @-> (ptr uint32_t) @-> (ptr uint32_t) @-> returning uint32_t)
(* hkeyClusterKey : HKEY -> (ptr void) *)
(* pPropertyTable : RESUTIL_PROPERTY_ITEM* -> (ptr void) *)
(* pOutPropertyList : void* out -> (ptr void) *)
(* cbOutPropertyListSize : DWORD -> uint32_t *)
(* pcbBytesReturned : DWORD* out -> (ptr uint32_t) *)
(* pcbRequired : DWORD* out -> (ptr uint32_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library resutils (t "RESUTILS.dll"))
(cffi:use-foreign-library resutils)
(cffi:defcfun ("ResUtilGetProperties" res-util-get-properties :convention :stdcall) :uint32
(hkey-cluster-key :pointer) ; HKEY
(p-property-table :pointer) ; RESUTIL_PROPERTY_ITEM*
(p-out-property-list :pointer) ; void* out
(cb-out-property-list-size :uint32) ; DWORD
(pcb-bytes-returned :pointer) ; DWORD* out
(pcb-required :pointer)) ; DWORD* out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $ResUtilGetProperties = Win32::API::More->new('RESUTILS',
'DWORD ResUtilGetProperties(HANDLE hkeyClusterKey, LPVOID pPropertyTable, LPVOID pOutPropertyList, DWORD cbOutPropertyListSize, LPVOID pcbBytesReturned, LPVOID pcbRequired)');
# my $ret = $ResUtilGetProperties->Call($hkeyClusterKey, $pPropertyTable, $pOutPropertyList, $cbOutPropertyListSize, $pcbBytesReturned, $pcbRequired);
# hkeyClusterKey : HKEY -> HANDLE
# pPropertyTable : RESUTIL_PROPERTY_ITEM* -> LPVOID
# pOutPropertyList : void* out -> LPVOID
# cbOutPropertyListSize : DWORD -> DWORD
# pcbBytesReturned : DWORD* out -> LPVOID
# pcbRequired : DWORD* out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。