Win32 API 日本語リファレンス
ホームSystem.Registry › RegQueryMultipleValuesW

RegQueryMultipleValuesW

関数
指定キーから複数のレジストリ値を一括取得する。
DLLADVAPI32.dll文字セットUnicode (-W)呼出規約winapi対応OSWindows 2000 以降

シグネチャ

// ADVAPI32.dll  (Unicode / -W)
#include <windows.h>

WIN32_ERROR RegQueryMultipleValuesW(
    HKEY hKey,
    VALENTW* val_list,
    DWORD num_vals,
    LPWSTR lpValueBuf,   // optional
    DWORD* ldwTotsize   // optional
);

パラメーター

名前方向説明
hKeyHKEYin

開いているレジストリキーへのハンドル。キーは KEY_QUERY_VALUE アクセス権で開かれている必要があります。詳細については、 Registry Key Security and Access Rights を参照してください。

このハンドルは、 RegCreateKeyExRegCreateKeyTransactedRegOpenKeyEx、または RegOpenKeyTransacted 関数によって返されます。次の 定義済みキー のいずれかを指定することもできます。

HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_PERFORMANCE_DATA
HKEY_USERS
val_listVALENTW*out

1 つ以上の値エントリを記述する VALENT 構造体の配列へのポインター。入力時、各構造体の ve_valuename メンバーには、取得する値の名前へのポインターを格納する必要があります。指定した値のいずれかが指定したキーに存在しない場合、関数は失敗します。

関数が成功すると、配列の各要素には指定した値の情報が格納されます。

num_valsDWORDinval_list 配列内の要素数。
lpValueBufLPWSTRoutoptional

バッファーへのポインター。関数が成功すると、バッファーには各値のデータが格納されます。

lpValueBufNULL の場合、ldwTotsize パラメーターが指す値はゼロでなければなりません。この場合、関数は ERROR_MORE_DATA を返し、ldwTotsize には必要なバッファーのサイズ(バイト単位)が格納されます。

ldwTotsizeDWORD*inoutoptionallpValueBuf パラメーターが指すバッファーのサイズ(バイト単位)を指定する変数へのポインター。関数が成功すると、ldwTotsize にはバッファーにコピーされたバイト数が格納されます。バッファーが小さすぎて関数が失敗した場合、ldwTotsize には必要なサイズ(バイト単位)が格納されます。

戻り値の型: WIN32_ERROR

公式ドキュメント

開いているレジストリキーに関連付けられた、値名のリストに対する型とデータを取得します。(Unicode)

戻り値

関数が成功すると、戻り値は ERROR_SUCCESS です。

関数が失敗すると、戻り値は次のエラーコードのいずれかになります。

戻り値 説明
ERROR_CANTREAD

RegQueryMultipleValues が動的キーのプロバイダーをインスタンス化またはアクセスできません。

ERROR_MORE_DATA
lpValueBuf が指すバッファーが小さすぎました。この場合、ldwTotsize には必要なバッファーサイズが格納されます。
ERROR_TRANSFER_TOO_LONG
要求されたデータの合計サイズ(val_list 配列のサイズ + ldwTotSize)が、システムの上限である 1 メガバイトを超えています。

解説(Remarks)

RegQueryMultipleValues 関数を使用すると、アプリケーションは静的キーまたは動的キーの 1 つ以上の値をクエリできます。対象のキーが静的キーの場合、システムはすべての値をアトミックに提供します。過度なシリアル化を防ぐため、この関数が返す集約データは 1 メガバイトを超えることはできません。

対象のキーが動的キーの場合、そのプロバイダーはすべての値をアトミックに提供する必要があります。これは、プロバイダーが結果バッファーを同期的に埋め、バッファー内のすべての値について一貫したビューを提供しつつ、過度なシリアル化を回避する必要があることを意味します。プロバイダーは、この関数へのアトミックな呼び出し中に、合計で最大 1 メガバイトの出力データを提供できます。

RegQueryMultipleValues はリモートでサポートされています。つまり、関数に渡される hKey パラメーターはリモートコンピューターを参照できます。

メモ

winreg.h ヘッダーは、UNICODE プリプロセッサ定数の定義に基づいて、この関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして RegQueryMultipleValues を定義します。エンコーディング中立のエイリアスの使用と、エンコーディング中立でないコードを混在させると、コンパイルエラーまたは実行時エラーを引き起こす不一致につながる可能性があります。詳細については、Conventions for Function Prototypes を参照してください。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での呼び出し定義

// ADVAPI32.dll  (Unicode / -W)
#include <windows.h>

WIN32_ERROR RegQueryMultipleValuesW(
    HKEY hKey,
    VALENTW* val_list,
    DWORD num_vals,
    LPWSTR lpValueBuf,   // optional
    DWORD* ldwTotsize   // optional
);
[DllImport("ADVAPI32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern uint RegQueryMultipleValuesW(
    IntPtr hKey,   // HKEY
    IntPtr val_list,   // VALENTW* out
    uint num_vals,   // DWORD
    [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpValueBuf,   // LPWSTR optional, out
    IntPtr ldwTotsize   // DWORD* optional, in/out
);
<DllImport("ADVAPI32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function RegQueryMultipleValuesW(
    hKey As IntPtr,   ' HKEY
    val_list As IntPtr,   ' VALENTW* out
    num_vals As UInteger,   ' DWORD
    <MarshalAs(UnmanagedType.LPWStr)> lpValueBuf As System.Text.StringBuilder,   ' LPWSTR optional, out
    ldwTotsize As IntPtr   ' DWORD* optional, in/out
) As UInteger
End Function
' hKey : HKEY
' val_list : VALENTW* out
' num_vals : DWORD
' lpValueBuf : LPWSTR optional, out
' ldwTotsize : DWORD* optional, in/out
Declare PtrSafe Function RegQueryMultipleValuesW Lib "advapi32" ( _
    ByVal hKey As LongPtr, _
    ByVal val_list As LongPtr, _
    ByVal num_vals As Long, _
    ByVal lpValueBuf As LongPtr, _
    ByVal ldwTotsize As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RegQueryMultipleValuesW = ctypes.windll.advapi32.RegQueryMultipleValuesW
RegQueryMultipleValuesW.restype = wintypes.DWORD
RegQueryMultipleValuesW.argtypes = [
    wintypes.HANDLE,  # hKey : HKEY
    ctypes.c_void_p,  # val_list : VALENTW* out
    wintypes.DWORD,  # num_vals : DWORD
    wintypes.LPWSTR,  # lpValueBuf : LPWSTR optional, out
    ctypes.POINTER(wintypes.DWORD),  # ldwTotsize : DWORD* optional, in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('ADVAPI32.dll')
RegQueryMultipleValuesW = Fiddle::Function.new(
  lib['RegQueryMultipleValuesW'],
  [
    Fiddle::TYPE_VOIDP,  # hKey : HKEY
    Fiddle::TYPE_VOIDP,  # val_list : VALENTW* out
    -Fiddle::TYPE_INT,  # num_vals : DWORD
    Fiddle::TYPE_VOIDP,  # lpValueBuf : LPWSTR optional, out
    Fiddle::TYPE_VOIDP,  # ldwTotsize : DWORD* optional, in/out
  ],
  -Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"
#[link(name = "advapi32")]
extern "system" {
    fn RegQueryMultipleValuesW(
        hKey: *mut core::ffi::c_void,  // HKEY
        val_list: *mut VALENTW,  // VALENTW* out
        num_vals: u32,  // DWORD
        lpValueBuf: *mut u16,  // LPWSTR optional, out
        ldwTotsize: *mut u32  // DWORD* optional, in/out
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("ADVAPI32.dll", CharSet = CharSet.Unicode)]
public static extern uint RegQueryMultipleValuesW(IntPtr hKey, IntPtr val_list, uint num_vals, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpValueBuf, IntPtr ldwTotsize);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ADVAPI32_RegQueryMultipleValuesW' -Namespace Win32 -PassThru
# $api::RegQueryMultipleValuesW(hKey, val_list, num_vals, lpValueBuf, ldwTotsize)
#uselib "ADVAPI32.dll"
#func global RegQueryMultipleValuesW "RegQueryMultipleValuesW" wptr, wptr, wptr, wptr, wptr
; RegQueryMultipleValuesW hKey, varptr(val_list), num_vals, varptr(lpValueBuf), varptr(ldwTotsize)   ; 戻り値は stat
; hKey : HKEY -> "wptr"
; val_list : VALENTW* out -> "wptr"
; num_vals : DWORD -> "wptr"
; lpValueBuf : LPWSTR optional, out -> "wptr"
; ldwTotsize : DWORD* optional, in/out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "ADVAPI32.dll"
#cfunc global RegQueryMultipleValuesW "RegQueryMultipleValuesW" sptr, var, int, var, var
; res = RegQueryMultipleValuesW(hKey, val_list, num_vals, lpValueBuf, ldwTotsize)
; hKey : HKEY -> "sptr"
; val_list : VALENTW* out -> "var"
; num_vals : DWORD -> "int"
; lpValueBuf : LPWSTR optional, out -> "var"
; ldwTotsize : DWORD* optional, in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; WIN32_ERROR RegQueryMultipleValuesW(HKEY hKey, VALENTW* val_list, DWORD num_vals, LPWSTR lpValueBuf, DWORD* ldwTotsize)
#uselib "ADVAPI32.dll"
#cfunc global RegQueryMultipleValuesW "RegQueryMultipleValuesW" intptr, var, int, var, var
; res = RegQueryMultipleValuesW(hKey, val_list, num_vals, lpValueBuf, ldwTotsize)
; hKey : HKEY -> "intptr"
; val_list : VALENTW* out -> "var"
; num_vals : DWORD -> "int"
; lpValueBuf : LPWSTR optional, out -> "var"
; ldwTotsize : DWORD* optional, in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	advapi32 = windows.NewLazySystemDLL("ADVAPI32.dll")
	procRegQueryMultipleValuesW = advapi32.NewProc("RegQueryMultipleValuesW")
)

// hKey (HKEY), val_list (VALENTW* out), num_vals (DWORD), lpValueBuf (LPWSTR optional, out), ldwTotsize (DWORD* optional, in/out)
r1, _, err := procRegQueryMultipleValuesW.Call(
	uintptr(hKey),
	uintptr(val_list),
	uintptr(num_vals),
	uintptr(lpValueBuf),
	uintptr(ldwTotsize),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // WIN32_ERROR
function RegQueryMultipleValuesW(
  hKey: THandle;   // HKEY
  val_list: Pointer;   // VALENTW* out
  num_vals: DWORD;   // DWORD
  lpValueBuf: PWideChar;   // LPWSTR optional, out
  ldwTotsize: Pointer   // DWORD* optional, in/out
): DWORD; stdcall;
  external 'ADVAPI32.dll' name 'RegQueryMultipleValuesW';
result := DllCall("ADVAPI32\RegQueryMultipleValuesW"
    , "Ptr", hKey   ; HKEY
    , "Ptr", val_list   ; VALENTW* out
    , "UInt", num_vals   ; DWORD
    , "Ptr", lpValueBuf   ; LPWSTR optional, out
    , "Ptr", ldwTotsize   ; DWORD* optional, in/out
    , "UInt")   ; return: WIN32_ERROR
●RegQueryMultipleValuesW(hKey, val_list, num_vals, lpValueBuf, ldwTotsize) = DLL("ADVAPI32.dll", "dword RegQueryMultipleValuesW(void*, void*, dword, char*, void*)")
# 呼び出し: RegQueryMultipleValuesW(hKey, val_list, num_vals, lpValueBuf, ldwTotsize)
# hKey : HKEY -> "void*"
# val_list : VALENTW* out -> "void*"
# num_vals : DWORD -> "dword"
# lpValueBuf : LPWSTR optional, out -> "char*"
# ldwTotsize : DWORD* optional, in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。
const std = @import("std");

extern "advapi32" fn RegQueryMultipleValuesW(
    hKey: ?*anyopaque, // HKEY
    val_list: [*c]VALENTW, // VALENTW* out
    num_vals: u32, // DWORD
    lpValueBuf: [*c]u16, // LPWSTR optional, out
    ldwTotsize: [*c]u32 // DWORD* optional, in/out
) callconv(std.os.windows.WINAPI) u32;
// Unicode(-W): UTF-16LE のヌル終端バッファ([*c]const u16)を渡す。
proc RegQueryMultipleValuesW(
    hKey: pointer,  # HKEY
    val_list: ptr VALENTW,  # VALENTW* out
    num_vals: uint32,  # DWORD
    lpValueBuf: ptr uint16,  # LPWSTR optional, out
    ldwTotsize: ptr uint32  # DWORD* optional, in/out
): uint32 {.importc: "RegQueryMultipleValuesW", stdcall, dynlib: "ADVAPI32.dll".}
# Unicode(-W): WideCString は newWideCString("...") で生成。
pragma(lib, "advapi32");
extern(Windows)
uint RegQueryMultipleValuesW(
    void* hKey,   // HKEY
    VALENTW* val_list,   // VALENTW* out
    uint num_vals,   // DWORD
    wchar* lpValueBuf,   // LPWSTR optional, out
    uint* ldwTotsize   // DWORD* optional, in/out
);
ccall((:RegQueryMultipleValuesW, "ADVAPI32.dll"), stdcall, UInt32,
      (Ptr{Cvoid}, Ptr{VALENTW}, UInt32, Ptr{UInt16}, Ptr{UInt32}),
      hKey, val_list, num_vals, lpValueBuf, ldwTotsize)
# hKey : HKEY -> Ptr{Cvoid}
# val_list : VALENTW* out -> Ptr{VALENTW}
# num_vals : DWORD -> UInt32
# lpValueBuf : LPWSTR optional, out -> Ptr{UInt16}
# ldwTotsize : DWORD* optional, in/out -> Ptr{UInt32}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
# Unicode(-W): Cwstring には transcode(UInt16, "...") 等で UTF-16 を渡す。
local ffi = require("ffi")
ffi.cdef[[
uint32_t RegQueryMultipleValuesW(
    void* hKey,
    void* val_list,
    uint32_t num_vals,
    uint16_t* lpValueBuf,
    uint32_t* ldwTotsize);
]]
local advapi32 = ffi.load("advapi32")
-- advapi32.RegQueryMultipleValuesW(hKey, val_list, num_vals, lpValueBuf, ldwTotsize)
-- hKey : HKEY
-- val_list : VALENTW* out
-- num_vals : DWORD
-- lpValueBuf : LPWSTR optional, out
-- ldwTotsize : DWORD* optional, in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
-- Unicode(-W): uint16_t* には UTF-16LE のバッファ(ffi.new("uint16_t[?]", ...))を渡す。
const koffi = require('koffi');
const lib = koffi.load('ADVAPI32.dll');
const RegQueryMultipleValuesW = lib.func('__stdcall', 'RegQueryMultipleValuesW', 'uint32_t', ['void *', 'void *', 'uint32_t', 'uint16_t *', 'uint32_t *']);
// RegQueryMultipleValuesW(hKey, val_list, num_vals, lpValueBuf, ldwTotsize)
// hKey : HKEY -> 'void *'
// val_list : VALENTW* out -> 'void *'
// num_vals : DWORD -> 'uint32_t'
// lpValueBuf : LPWSTR optional, out -> 'uint16_t *'
// ldwTotsize : DWORD* optional, in/out -> 'uint32_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("ADVAPI32.dll", {
  RegQueryMultipleValuesW: { parameters: ["pointer", "pointer", "u32", "buffer", "pointer"], result: "u32" },
});
// lib.symbols.RegQueryMultipleValuesW(hKey, val_list, num_vals, lpValueBuf, ldwTotsize)
// hKey : HKEY -> "pointer"
// val_list : VALENTW* out -> "pointer"
// num_vals : DWORD -> "u32"
// lpValueBuf : LPWSTR optional, out -> "buffer"
// ldwTotsize : DWORD* optional, in/out -> "pointer"
// 文字列は "buffer"。Unicode(-W) は new TextEncoder() ではなく UTF-16LE のバイト列(末尾に \x00\x00)を Uint8Array で渡す。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
uint32_t RegQueryMultipleValuesW(
    void* hKey,
    void* val_list,
    uint32_t num_vals,
    uint16_t* lpValueBuf,
    uint32_t* ldwTotsize);
C, "ADVAPI32.dll");
// $ffi->RegQueryMultipleValuesW(hKey, val_list, num_vals, lpValueBuf, ldwTotsize);
// hKey : HKEY
// val_list : VALENTW* out
// num_vals : DWORD
// lpValueBuf : LPWSTR optional, out
// ldwTotsize : DWORD* optional, in/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 Advapi32 extends StdCallLibrary {
    Advapi32 INSTANCE = Native.load("advapi32", Advapi32.class, W32APIOptions.UNICODE_OPTIONS);
    int RegQueryMultipleValuesW(
        Pointer hKey,   // HKEY
        Pointer val_list,   // VALENTW* out
        int num_vals,   // DWORD
        char[] lpValueBuf,   // LPWSTR optional, out
        IntByReference ldwTotsize   // DWORD* optional, in/out
    );
}
// Unicode(-W): WString(入力)/char[](出力)で UTF-16 をマーシャリング。
@[Link("advapi32")]
lib LibADVAPI32
  fun RegQueryMultipleValuesW = RegQueryMultipleValuesW(
    hKey : Void*,   # HKEY
    val_list : VALENTW*,   # VALENTW* out
    num_vals : UInt32,   # DWORD
    lpValueBuf : UInt16*,   # LPWSTR optional, out
    ldwTotsize : UInt32*   # DWORD* optional, in/out
  ) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef RegQueryMultipleValuesWNative = Uint32 Function(Pointer<Void>, Pointer<Void>, Uint32, Pointer<Utf16>, Pointer<Uint32>);
typedef RegQueryMultipleValuesWDart = int Function(Pointer<Void>, Pointer<Void>, int, Pointer<Utf16>, Pointer<Uint32>);
final RegQueryMultipleValuesW = DynamicLibrary.open('ADVAPI32.dll')
    .lookupFunction<RegQueryMultipleValuesWNative, RegQueryMultipleValuesWDart>('RegQueryMultipleValuesW');
// hKey : HKEY -> Pointer<Void>
// val_list : VALENTW* out -> Pointer<Void>
// num_vals : DWORD -> Uint32
// lpValueBuf : LPWSTR optional, out -> Pointer<Utf16>
// ldwTotsize : DWORD* optional, in/out -> Pointer<Uint32>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
function RegQueryMultipleValuesW(
  hKey: THandle;   // HKEY
  val_list: Pointer;   // VALENTW* out
  num_vals: DWORD;   // DWORD
  lpValueBuf: PWideChar;   // LPWSTR optional, out
  ldwTotsize: Pointer   // DWORD* optional, in/out
): DWORD; stdcall;
  external 'ADVAPI32.dll' name 'RegQueryMultipleValuesW';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "RegQueryMultipleValuesW"
  c_RegQueryMultipleValuesW :: Ptr () -> Ptr () -> Word32 -> CWString -> Ptr Word32 -> IO Word32
-- hKey : HKEY -> Ptr ()
-- val_list : VALENTW* out -> Ptr ()
-- num_vals : DWORD -> Word32
-- lpValueBuf : LPWSTR optional, out -> CWString
-- ldwTotsize : DWORD* optional, in/out -> Ptr Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let regquerymultiplevaluesw =
  foreign "RegQueryMultipleValuesW"
    ((ptr void) @-> (ptr void) @-> uint32_t @-> (ptr uint16_t) @-> (ptr uint32_t) @-> returning uint32_t)
(* hKey : HKEY -> (ptr void) *)
(* val_list : VALENTW* out -> (ptr void) *)
(* num_vals : DWORD -> uint32_t *)
(* lpValueBuf : LPWSTR optional, out -> (ptr uint16_t) *)
(* ldwTotsize : DWORD* optional, in/out -> (ptr uint32_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library advapi32 (t "ADVAPI32.dll"))
(cffi:use-foreign-library advapi32)

(cffi:defcfun ("RegQueryMultipleValuesW" reg-query-multiple-values-w :convention :stdcall) :uint32
  (h-key :pointer)   ; HKEY
  (val-list :pointer)   ; VALENTW* out
  (num-vals :uint32)   ; DWORD
  (lp-value-buf :pointer)   ; LPWSTR optional, out
  (ldw-totsize :pointer))   ; DWORD* optional, in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $RegQueryMultipleValuesW = Win32::API::More->new('ADVAPI32',
    'DWORD RegQueryMultipleValuesW(HANDLE hKey, LPVOID val_list, DWORD num_vals, LPWSTR lpValueBuf, LPVOID ldwTotsize)');
# my $ret = $RegQueryMultipleValuesW->Call($hKey, $val_list, $num_vals, $lpValueBuf, $ldwTotsize);
# hKey : HKEY -> HANDLE
# val_list : VALENTW* out -> LPVOID
# num_vals : DWORD -> DWORD
# lpValueBuf : LPWSTR optional, out -> LPWSTR
# ldwTotsize : DWORD* optional, in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。
# Unicode(-W): LPCWSTR/LPWSTR は Win32::API が UTF-16 変換を行う。

関連項目

文字セット違い
使用する型