SHRegOpenUSKeyW
関数HKCUとHKLMを統合するユーザー単位レジストリキーを開く。
シグネチャ
// SHLWAPI.dll (Unicode / -W)
#include <windows.h>
WIN32_ERROR SHRegOpenUSKeyW(
LPCWSTR pwzPath,
DWORD samDesired,
INT_PTR hRelativeUSKey, // optional
INT_PTR* phNewUSKey,
BOOL fIgnoreHKCU
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| pwzPath | LPCWSTR | in | TBD |
| samDesired | DWORD | in | 要求するセキュリティ アクセスです。セキュリティ アクセスの詳細については、REGSAM を参照してください。 |
| hRelativeUSKey | INT_PTR | inoptional | 相対パスの基準として使用するキーです。pszPath が相対パスの場合、それが指定するキーは hRelativeUSKey からの相対になります。pszPath が絶対パスの場合は、hRelativeUSKey に NULL を設定します。 |
| phNewUSKey | INT_PTR* | out | 開かれたキーのハンドルへのポインターです。 |
| fIgnoreHKCU | BOOL | in | どのキーを参照するかを指定する変数です。TRUE に設定すると、SHRegOpenUSKey は HKEY_CURRENT_USER を無視し、HKEY_LOCAL_MACHINE から値を返します。 - pszPath [in]型: LPCTSTR サブキーの名前を含む、null 終端文字列へのポインターです。 |
戻り値の型: WIN32_ERROR
公式ドキュメント
ユーザー固有のサブツリー(HKEY_CURRENT_USER または HKEY_LOCAL_MACHINE)内のレジストリ サブキーを開きます。(Unicode)
戻り値
型: LSTATUS
成功した場合は ERROR_SUCCESS を返し、それ以外の場合は Winerror.h で定義されている 0 以外のエラー コードを返します。FORMAT_MESSAGE_FROM_SYSTEM フラグを指定して FormatMessage 関数を使用すると、エラーの一般的な説明を取得できます。
解説(Remarks)
メモ
shlwapi.h ヘッダーは、SHRegOpenUSKey を、UNICODE プリプロセッサ定数の定義に基づいてこの関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして定義します。エンコード非依存のエイリアスの使用を、エンコード非依存でないコードと混在させると、不一致が生じ、コンパイル エラーや実行時エラーの原因となることがあります。詳細については、関数プロトタイプの規則 を参照してください。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// SHLWAPI.dll (Unicode / -W)
#include <windows.h>
WIN32_ERROR SHRegOpenUSKeyW(
LPCWSTR pwzPath,
DWORD samDesired,
INT_PTR hRelativeUSKey, // optional
INT_PTR* phNewUSKey,
BOOL fIgnoreHKCU
);[DllImport("SHLWAPI.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern uint SHRegOpenUSKeyW(
[MarshalAs(UnmanagedType.LPWStr)] string pwzPath, // LPCWSTR
uint samDesired, // DWORD
IntPtr hRelativeUSKey, // INT_PTR optional
out IntPtr phNewUSKey, // INT_PTR* out
bool fIgnoreHKCU // BOOL
);<DllImport("SHLWAPI.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function SHRegOpenUSKeyW(
<MarshalAs(UnmanagedType.LPWStr)> pwzPath As String, ' LPCWSTR
samDesired As UInteger, ' DWORD
hRelativeUSKey As IntPtr, ' INT_PTR optional
<Out> ByRef phNewUSKey As IntPtr, ' INT_PTR* out
fIgnoreHKCU As Boolean ' BOOL
) As UInteger
End Function' pwzPath : LPCWSTR
' samDesired : DWORD
' hRelativeUSKey : INT_PTR optional
' phNewUSKey : INT_PTR* out
' fIgnoreHKCU : BOOL
Declare PtrSafe Function SHRegOpenUSKeyW Lib "shlwapi" ( _
ByVal pwzPath As LongPtr, _
ByVal samDesired As Long, _
ByVal hRelativeUSKey As LongPtr, _
ByRef phNewUSKey As LongPtr, _
ByVal fIgnoreHKCU As Long) 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
SHRegOpenUSKeyW = ctypes.windll.shlwapi.SHRegOpenUSKeyW
SHRegOpenUSKeyW.restype = wintypes.DWORD
SHRegOpenUSKeyW.argtypes = [
wintypes.LPCWSTR, # pwzPath : LPCWSTR
wintypes.DWORD, # samDesired : DWORD
ctypes.c_ssize_t, # hRelativeUSKey : INT_PTR optional
ctypes.POINTER(ctypes.c_ssize_t), # phNewUSKey : INT_PTR* out
wintypes.BOOL, # fIgnoreHKCU : BOOL
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('SHLWAPI.dll')
SHRegOpenUSKeyW = Fiddle::Function.new(
lib['SHRegOpenUSKeyW'],
[
Fiddle::TYPE_VOIDP, # pwzPath : LPCWSTR
-Fiddle::TYPE_INT, # samDesired : DWORD
Fiddle::TYPE_INTPTR_T, # hRelativeUSKey : INT_PTR optional
Fiddle::TYPE_VOIDP, # phNewUSKey : INT_PTR* out
Fiddle::TYPE_INT, # fIgnoreHKCU : BOOL
],
-Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "shlwapi")]
extern "system" {
fn SHRegOpenUSKeyW(
pwzPath: *const u16, // LPCWSTR
samDesired: u32, // DWORD
hRelativeUSKey: isize, // INT_PTR optional
phNewUSKey: *mut isize, // INT_PTR* out
fIgnoreHKCU: i32 // BOOL
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("SHLWAPI.dll", CharSet = CharSet.Unicode)]
public static extern uint SHRegOpenUSKeyW([MarshalAs(UnmanagedType.LPWStr)] string pwzPath, uint samDesired, IntPtr hRelativeUSKey, out IntPtr phNewUSKey, bool fIgnoreHKCU);
"@
$api = Add-Type -MemberDefinition $sig -Name 'SHLWAPI_SHRegOpenUSKeyW' -Namespace Win32 -PassThru
# $api::SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU)#uselib "SHLWAPI.dll"
#func global SHRegOpenUSKeyW "SHRegOpenUSKeyW" wptr, wptr, wptr, wptr, wptr
; SHRegOpenUSKeyW pwzPath, samDesired, hRelativeUSKey, varptr(phNewUSKey), fIgnoreHKCU ; 戻り値は stat
; pwzPath : LPCWSTR -> "wptr"
; samDesired : DWORD -> "wptr"
; hRelativeUSKey : INT_PTR optional -> "wptr"
; phNewUSKey : INT_PTR* out -> "wptr"
; fIgnoreHKCU : BOOL -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "SHLWAPI.dll" #cfunc global SHRegOpenUSKeyW "SHRegOpenUSKeyW" wstr, int, sptr, var, int ; res = SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU) ; pwzPath : LPCWSTR -> "wstr" ; samDesired : DWORD -> "int" ; hRelativeUSKey : INT_PTR optional -> "sptr" ; phNewUSKey : INT_PTR* out -> "var" ; fIgnoreHKCU : BOOL -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "SHLWAPI.dll" #cfunc global SHRegOpenUSKeyW "SHRegOpenUSKeyW" wstr, int, sptr, sptr, int ; res = SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, varptr(phNewUSKey), fIgnoreHKCU) ; pwzPath : LPCWSTR -> "wstr" ; samDesired : DWORD -> "int" ; hRelativeUSKey : INT_PTR optional -> "sptr" ; phNewUSKey : INT_PTR* out -> "sptr" ; fIgnoreHKCU : BOOL -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; WIN32_ERROR SHRegOpenUSKeyW(LPCWSTR pwzPath, DWORD samDesired, INT_PTR hRelativeUSKey, INT_PTR* phNewUSKey, BOOL fIgnoreHKCU) #uselib "SHLWAPI.dll" #cfunc global SHRegOpenUSKeyW "SHRegOpenUSKeyW" wstr, int, intptr, var, int ; res = SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU) ; pwzPath : LPCWSTR -> "wstr" ; samDesired : DWORD -> "int" ; hRelativeUSKey : INT_PTR optional -> "intptr" ; phNewUSKey : INT_PTR* out -> "var" ; fIgnoreHKCU : BOOL -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; WIN32_ERROR SHRegOpenUSKeyW(LPCWSTR pwzPath, DWORD samDesired, INT_PTR hRelativeUSKey, INT_PTR* phNewUSKey, BOOL fIgnoreHKCU) #uselib "SHLWAPI.dll" #cfunc global SHRegOpenUSKeyW "SHRegOpenUSKeyW" wstr, int, intptr, intptr, int ; res = SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, varptr(phNewUSKey), fIgnoreHKCU) ; pwzPath : LPCWSTR -> "wstr" ; samDesired : DWORD -> "int" ; hRelativeUSKey : INT_PTR optional -> "intptr" ; phNewUSKey : INT_PTR* out -> "intptr" ; fIgnoreHKCU : BOOL -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
shlwapi = windows.NewLazySystemDLL("SHLWAPI.dll")
procSHRegOpenUSKeyW = shlwapi.NewProc("SHRegOpenUSKeyW")
)
// pwzPath (LPCWSTR), samDesired (DWORD), hRelativeUSKey (INT_PTR optional), phNewUSKey (INT_PTR* out), fIgnoreHKCU (BOOL)
r1, _, err := procSHRegOpenUSKeyW.Call(
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(pwzPath))),
uintptr(samDesired),
uintptr(hRelativeUSKey),
uintptr(phNewUSKey),
uintptr(fIgnoreHKCU),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // WIN32_ERRORfunction SHRegOpenUSKeyW(
pwzPath: PWideChar; // LPCWSTR
samDesired: DWORD; // DWORD
hRelativeUSKey: NativeInt; // INT_PTR optional
phNewUSKey: Pointer; // INT_PTR* out
fIgnoreHKCU: BOOL // BOOL
): DWORD; stdcall;
external 'SHLWAPI.dll' name 'SHRegOpenUSKeyW';result := DllCall("SHLWAPI\SHRegOpenUSKeyW"
, "WStr", pwzPath ; LPCWSTR
, "UInt", samDesired ; DWORD
, "Ptr", hRelativeUSKey ; INT_PTR optional
, "Ptr", phNewUSKey ; INT_PTR* out
, "Int", fIgnoreHKCU ; BOOL
, "UInt") ; return: WIN32_ERROR●SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU) = DLL("SHLWAPI.dll", "dword SHRegOpenUSKeyW(char*, dword, int, void*, bool)")
# 呼び出し: SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU)
# pwzPath : LPCWSTR -> "char*"
# samDesired : DWORD -> "dword"
# hRelativeUSKey : INT_PTR optional -> "int"
# phNewUSKey : INT_PTR* out -> "void*"
# fIgnoreHKCU : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。const std = @import("std");
extern "shlwapi" fn SHRegOpenUSKeyW(
pwzPath: [*c]const u16, // LPCWSTR
samDesired: u32, // DWORD
hRelativeUSKey: isize, // INT_PTR optional
phNewUSKey: [*c]isize, // INT_PTR* out
fIgnoreHKCU: i32 // BOOL
) callconv(std.os.windows.WINAPI) u32;
// Unicode(-W): UTF-16LE のヌル終端バッファ([*c]const u16)を渡す。proc SHRegOpenUSKeyW(
pwzPath: WideCString, # LPCWSTR
samDesired: uint32, # DWORD
hRelativeUSKey: int, # INT_PTR optional
phNewUSKey: ptr int, # INT_PTR* out
fIgnoreHKCU: int32 # BOOL
): uint32 {.importc: "SHRegOpenUSKeyW", stdcall, dynlib: "SHLWAPI.dll".}
# Unicode(-W): WideCString は newWideCString("...") で生成。pragma(lib, "shlwapi");
extern(Windows)
uint SHRegOpenUSKeyW(
const(wchar)* pwzPath, // LPCWSTR
uint samDesired, // DWORD
ptrdiff_t hRelativeUSKey, // INT_PTR optional
ptrdiff_t* phNewUSKey, // INT_PTR* out
int fIgnoreHKCU // BOOL
);ccall((:SHRegOpenUSKeyW, "SHLWAPI.dll"), stdcall, UInt32,
(Cwstring, UInt32, Int, Ptr{Int}, Int32),
pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU)
# pwzPath : LPCWSTR -> Cwstring
# samDesired : DWORD -> UInt32
# hRelativeUSKey : INT_PTR optional -> Int
# phNewUSKey : INT_PTR* out -> Ptr{Int}
# fIgnoreHKCU : BOOL -> Int32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
# Unicode(-W): Cwstring には transcode(UInt16, "...") 等で UTF-16 を渡す。local ffi = require("ffi")
ffi.cdef[[
uint32_t SHRegOpenUSKeyW(
const uint16_t* pwzPath,
uint32_t samDesired,
intptr_t hRelativeUSKey,
intptr_t* phNewUSKey,
int32_t fIgnoreHKCU);
]]
local shlwapi = ffi.load("shlwapi")
-- shlwapi.SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU)
-- pwzPath : LPCWSTR
-- samDesired : DWORD
-- hRelativeUSKey : INT_PTR optional
-- phNewUSKey : INT_PTR* out
-- fIgnoreHKCU : BOOL
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
-- Unicode(-W): uint16_t* には UTF-16LE のバッファ(ffi.new("uint16_t[?]", ...))を渡す。const koffi = require('koffi');
const lib = koffi.load('SHLWAPI.dll');
const SHRegOpenUSKeyW = lib.func('__stdcall', 'SHRegOpenUSKeyW', 'uint32_t', ['str16', 'uint32_t', 'intptr_t', 'intptr_t *', 'int32_t']);
// SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU)
// pwzPath : LPCWSTR -> 'str16'
// samDesired : DWORD -> 'uint32_t'
// hRelativeUSKey : INT_PTR optional -> 'intptr_t'
// phNewUSKey : INT_PTR* out -> 'intptr_t *'
// fIgnoreHKCU : BOOL -> 'int32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("SHLWAPI.dll", {
SHRegOpenUSKeyW: { parameters: ["buffer", "u32", "isize", "pointer", "i32"], result: "u32" },
});
// lib.symbols.SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU)
// pwzPath : LPCWSTR -> "buffer"
// samDesired : DWORD -> "u32"
// hRelativeUSKey : INT_PTR optional -> "isize"
// phNewUSKey : INT_PTR* out -> "pointer"
// fIgnoreHKCU : BOOL -> "i32"
// 文字列は "buffer"。Unicode(-W) は new TextEncoder() ではなく UTF-16LE のバイト列(末尾に \x00\x00)を Uint8Array で渡す。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
uint32_t SHRegOpenUSKeyW(
const uint16_t* pwzPath,
uint32_t samDesired,
intptr_t hRelativeUSKey,
intptr_t* phNewUSKey,
int32_t fIgnoreHKCU);
C, "SHLWAPI.dll");
// $ffi->SHRegOpenUSKeyW(pwzPath, samDesired, hRelativeUSKey, phNewUSKey, fIgnoreHKCU);
// pwzPath : LPCWSTR
// samDesired : DWORD
// hRelativeUSKey : INT_PTR optional
// phNewUSKey : INT_PTR* out
// fIgnoreHKCU : BOOL
// 構造体/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 Shlwapi extends StdCallLibrary {
Shlwapi INSTANCE = Native.load("shlwapi", Shlwapi.class, W32APIOptions.UNICODE_OPTIONS);
int SHRegOpenUSKeyW(
WString pwzPath, // LPCWSTR
int samDesired, // DWORD
long hRelativeUSKey, // INT_PTR optional
LongByReference phNewUSKey, // INT_PTR* out
boolean fIgnoreHKCU // BOOL
);
}
// Unicode(-W): WString(入力)/char[](出力)で UTF-16 をマーシャリング。@[Link("shlwapi")]
lib LibSHLWAPI
fun SHRegOpenUSKeyW = SHRegOpenUSKeyW(
pwzPath : UInt16*, # LPCWSTR
samDesired : UInt32, # DWORD
hRelativeUSKey : LibC::SSizeT, # INT_PTR optional
phNewUSKey : LibC::SSizeT*, # INT_PTR* out
fIgnoreHKCU : Int32 # BOOL
) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef SHRegOpenUSKeyWNative = Uint32 Function(Pointer<Utf16>, Uint32, IntPtr, Pointer<IntPtr>, Int32);
typedef SHRegOpenUSKeyWDart = int Function(Pointer<Utf16>, int, int, Pointer<IntPtr>, int);
final SHRegOpenUSKeyW = DynamicLibrary.open('SHLWAPI.dll')
.lookupFunction<SHRegOpenUSKeyWNative, SHRegOpenUSKeyWDart>('SHRegOpenUSKeyW');
// pwzPath : LPCWSTR -> Pointer<Utf16>
// samDesired : DWORD -> Uint32
// hRelativeUSKey : INT_PTR optional -> IntPtr
// phNewUSKey : INT_PTR* out -> Pointer<IntPtr>
// fIgnoreHKCU : BOOL -> Int32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function SHRegOpenUSKeyW(
pwzPath: PWideChar; // LPCWSTR
samDesired: DWORD; // DWORD
hRelativeUSKey: NativeInt; // INT_PTR optional
phNewUSKey: Pointer; // INT_PTR* out
fIgnoreHKCU: BOOL // BOOL
): DWORD; stdcall;
external 'SHLWAPI.dll' name 'SHRegOpenUSKeyW';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "SHRegOpenUSKeyW"
c_SHRegOpenUSKeyW :: CWString -> Word32 -> CIntPtr -> Ptr CIntPtr -> CInt -> IO Word32
-- pwzPath : LPCWSTR -> CWString
-- samDesired : DWORD -> Word32
-- hRelativeUSKey : INT_PTR optional -> CIntPtr
-- phNewUSKey : INT_PTR* out -> Ptr CIntPtr
-- fIgnoreHKCU : BOOL -> CInt
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let shregopenuskeyw =
foreign "SHRegOpenUSKeyW"
((ptr uint16_t) @-> uint32_t @-> intptr_t @-> (ptr intptr_t) @-> int32_t @-> returning uint32_t)
(* pwzPath : LPCWSTR -> (ptr uint16_t) *)
(* samDesired : DWORD -> uint32_t *)
(* hRelativeUSKey : INT_PTR optional -> intptr_t *)
(* phNewUSKey : INT_PTR* out -> (ptr intptr_t) *)
(* fIgnoreHKCU : BOOL -> int32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library shlwapi (t "SHLWAPI.dll"))
(cffi:use-foreign-library shlwapi)
(cffi:defcfun ("SHRegOpenUSKeyW" shreg-open-uskey-w :convention :stdcall) :uint32
(pwz-path (:string :encoding :utf-16le)) ; LPCWSTR
(sam-desired :uint32) ; DWORD
(h-relative-uskey :int64) ; INT_PTR optional
(ph-new-uskey :pointer) ; INT_PTR* out
(f-ignore-hkcu :int32)) ; BOOL
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $SHRegOpenUSKeyW = Win32::API::More->new('SHLWAPI',
'DWORD SHRegOpenUSKeyW(LPCWSTR pwzPath, DWORD samDesired, LPARAM hRelativeUSKey, LPVOID phNewUSKey, BOOL fIgnoreHKCU)');
# my $ret = $SHRegOpenUSKeyW->Call($pwzPath, $samDesired, $hRelativeUSKey, $phNewUSKey, $fIgnoreHKCU);
# pwzPath : LPCWSTR -> LPCWSTR
# samDesired : DWORD -> DWORD
# hRelativeUSKey : INT_PTR optional -> LPARAM
# phNewUSKey : INT_PTR* out -> LPVOID
# fIgnoreHKCU : BOOL -> BOOL
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。
# Unicode(-W): LPCWSTR/LPWSTR は Win32::API が UTF-16 変換を行う。関連項目
文字セット違い
- f SHRegOpenUSKeyA (ANSI版) — HKCUとHKLMを統合するユーザー単位レジストリキーを開く。
使用する型