MsiGetProductInfoW
関数シグネチャ
// msi.dll (Unicode / -W)
#include <windows.h>
DWORD MsiGetProductInfoW(
LPCWSTR szProduct,
LPCWSTR szAttribute,
LPWSTR lpValueBuf, // optional
DWORD* pcchValueBuf // optional
);パラメーター
| 名前 | 型 | 方向 | 説明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| szProduct | LPCWSTR | in | 製品のプロダクトコードを指定します。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| szAttribute | LPCWSTR | in | 取得するプロパティを指定します。 Required Properties は必ず利用可能ですが、その他のプロパティはそのプロパティが設定されている場合にのみ利用可能です。詳細については、Properties を参照してください。次の一覧に示すプロパティは、インストール済みのアプリケーションからのみ取得できます。
インストール済みのアプリケーションからプロダクト ID、登録された所有者、または登録された会社を取得するには、szProperty に次のテキスト文字列値のいずれかを設定します。
製品のインスタンスタイプを取得するには、szProperty に次の値を設定します。このプロパティは、アドバタイズ済みまたはインストール済みの製品で利用可能です。
次の一覧に示すアドバタイズ済みプロパティは、アドバタイズ済みまたはインストール済みのアプリケーションから取得できます。
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lpValueBuf | LPWSTR | outoptional | プロパティ値を受け取るバッファーへのポインター。このパラメーターは null にできます。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pcchValueBuf | DWORD* | inoutoptional | lpValueBuf パラメーターが指すバッファーのサイズを文字単位で指定する変数へのポインター。入力時には、終端の null 文字用の領域を含むバッファーの全体サイズを指定します。渡されたバッファーが小さすぎる場合、返されるカウントには終端の null 文字は含まれません。 lpValueBuf が null の場合、pcchValueBuf も null にできます。この場合、関数はプロパティが製品に対して正しく登録されているかどうかを確認します。 |
戻り値の型: DWORD
公式ドキュメント
MsiGetProductInfo 関数は、公開済みおよびインストール済みの製品に関する製品情報を返します。(Unicode)
戻り値
| 値 | 意味 |
|---|---|
| 構成データが破損しています。 | |
| 無効なパラメーターが関数に渡されました。 | |
| 要求されたデータを保持するにはバッファーが小さすぎます。 | |
| 関数は正常に完了しました。 | |
| 製品がアドバタイズ解除またはアンインストールされています。 | |
|
プロパティが認識されません。
注意 クエリ対象のアプリケーションがアドバタイズされておりインストールされていない場合、MsiGetProductInfo 関数は ERROR_UNKNOWN_PROPERTY を返します。
|
解説(Remarks)
MsiGetProductInfo 関数が戻ると、pcchValueBuf パラメーターにはバッファーに格納された文字列の長さが格納されます。返されるカウントには終端の null 文字は含まれません。バッファーが十分な大きさでない場合、MsiGetProductInfo は ERROR_MORE_DATA を返し、pcchValueBuf には null 文字を含まない文字列のサイズ (文字単位) が格納されます。
MsiGetProductInfo(INSTALLPROPERTY_LOCALPACKAGE) は、必ずしもキャッシュされたパッケージへのパスを返すとは限りません。キャッシュされたパッケージは内部使用専用です。メンテナンスモードのインストールは、MsiConfigureFeature、MsiConfigureProduct、または MsiConfigureProductEx 関数を通じて呼び出す必要があります。
インストール済みの製品でのみ利用可能なプロパティを MsiGetProductInfo でアドバタイズ済みの製品に対してクエリしようとすると、関数は ERROR_UNKNOWN_PROPERTY を返します。たとえば、アプリケーションがアドバタイズされておりインストールされていない場合、INSTALLPROPERTY_INSTALLLOCATION プロパティへのクエリは ERROR_UNKNOWN_PROPERTY エラーを返します。
msi.h ヘッダーは、UNICODE プリプロセッサ定数の定義に基づいて、この関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして MsiGetProductInfo を定義します。エンコーディング中立のエイリアスの使用と、エンコーディング中立でないコードを混在させると、コンパイルエラーや実行時エラーを引き起こす不一致につながる可能性があります。詳細については、Conventions for Function Prototypes を参照してください。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// msi.dll (Unicode / -W)
#include <windows.h>
DWORD MsiGetProductInfoW(
LPCWSTR szProduct,
LPCWSTR szAttribute,
LPWSTR lpValueBuf, // optional
DWORD* pcchValueBuf // optional
);[DllImport("msi.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern uint MsiGetProductInfoW(
[MarshalAs(UnmanagedType.LPWStr)] string szProduct, // LPCWSTR
[MarshalAs(UnmanagedType.LPWStr)] string szAttribute, // LPCWSTR
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpValueBuf, // LPWSTR optional, out
IntPtr pcchValueBuf // DWORD* optional, in/out
);<DllImport("msi.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function MsiGetProductInfoW(
<MarshalAs(UnmanagedType.LPWStr)> szProduct As String, ' LPCWSTR
<MarshalAs(UnmanagedType.LPWStr)> szAttribute As String, ' LPCWSTR
<MarshalAs(UnmanagedType.LPWStr)> lpValueBuf As System.Text.StringBuilder, ' LPWSTR optional, out
pcchValueBuf As IntPtr ' DWORD* optional, in/out
) As UInteger
End Function' szProduct : LPCWSTR
' szAttribute : LPCWSTR
' lpValueBuf : LPWSTR optional, out
' pcchValueBuf : DWORD* optional, in/out
Declare PtrSafe Function MsiGetProductInfoW Lib "msi" ( _
ByVal szProduct As LongPtr, _
ByVal szAttribute As LongPtr, _
ByVal lpValueBuf As LongPtr, _
ByVal pcchValueBuf 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
MsiGetProductInfoW = ctypes.windll.msi.MsiGetProductInfoW
MsiGetProductInfoW.restype = wintypes.DWORD
MsiGetProductInfoW.argtypes = [
wintypes.LPCWSTR, # szProduct : LPCWSTR
wintypes.LPCWSTR, # szAttribute : LPCWSTR
wintypes.LPWSTR, # lpValueBuf : LPWSTR optional, out
ctypes.POINTER(wintypes.DWORD), # pcchValueBuf : DWORD* optional, in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('msi.dll')
MsiGetProductInfoW = Fiddle::Function.new(
lib['MsiGetProductInfoW'],
[
Fiddle::TYPE_VOIDP, # szProduct : LPCWSTR
Fiddle::TYPE_VOIDP, # szAttribute : LPCWSTR
Fiddle::TYPE_VOIDP, # lpValueBuf : LPWSTR optional, out
Fiddle::TYPE_VOIDP, # pcchValueBuf : DWORD* optional, in/out
],
-Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "msi")]
extern "system" {
fn MsiGetProductInfoW(
szProduct: *const u16, // LPCWSTR
szAttribute: *const u16, // LPCWSTR
lpValueBuf: *mut u16, // LPWSTR optional, out
pcchValueBuf: *mut u32 // DWORD* optional, in/out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("msi.dll", CharSet = CharSet.Unicode)]
public static extern uint MsiGetProductInfoW([MarshalAs(UnmanagedType.LPWStr)] string szProduct, [MarshalAs(UnmanagedType.LPWStr)] string szAttribute, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpValueBuf, IntPtr pcchValueBuf);
"@
$api = Add-Type -MemberDefinition $sig -Name 'msi_MsiGetProductInfoW' -Namespace Win32 -PassThru
# $api::MsiGetProductInfoW(szProduct, szAttribute, lpValueBuf, pcchValueBuf)#uselib "msi.dll"
#func global MsiGetProductInfoW "MsiGetProductInfoW" wptr, wptr, wptr, wptr
; MsiGetProductInfoW szProduct, szAttribute, varptr(lpValueBuf), varptr(pcchValueBuf) ; 戻り値は stat
; szProduct : LPCWSTR -> "wptr"
; szAttribute : LPCWSTR -> "wptr"
; lpValueBuf : LPWSTR optional, out -> "wptr"
; pcchValueBuf : DWORD* optional, in/out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "msi.dll" #cfunc global MsiGetProductInfoW "MsiGetProductInfoW" wstr, wstr, var, var ; res = MsiGetProductInfoW(szProduct, szAttribute, lpValueBuf, pcchValueBuf) ; szProduct : LPCWSTR -> "wstr" ; szAttribute : LPCWSTR -> "wstr" ; lpValueBuf : LPWSTR optional, out -> "var" ; pcchValueBuf : DWORD* optional, in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "msi.dll" #cfunc global MsiGetProductInfoW "MsiGetProductInfoW" wstr, wstr, sptr, sptr ; res = MsiGetProductInfoW(szProduct, szAttribute, varptr(lpValueBuf), varptr(pcchValueBuf)) ; szProduct : LPCWSTR -> "wstr" ; szAttribute : LPCWSTR -> "wstr" ; lpValueBuf : LPWSTR optional, out -> "sptr" ; pcchValueBuf : DWORD* optional, in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
; DWORD MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute, LPWSTR lpValueBuf, DWORD* pcchValueBuf) #uselib "msi.dll" #cfunc global MsiGetProductInfoW "MsiGetProductInfoW" wstr, wstr, var, var ; res = MsiGetProductInfoW(szProduct, szAttribute, lpValueBuf, pcchValueBuf) ; szProduct : LPCWSTR -> "wstr" ; szAttribute : LPCWSTR -> "wstr" ; lpValueBuf : LPWSTR optional, out -> "var" ; pcchValueBuf : DWORD* optional, in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute, LPWSTR lpValueBuf, DWORD* pcchValueBuf) #uselib "msi.dll" #cfunc global MsiGetProductInfoW "MsiGetProductInfoW" wstr, wstr, intptr, intptr ; res = MsiGetProductInfoW(szProduct, szAttribute, varptr(lpValueBuf), varptr(pcchValueBuf)) ; szProduct : LPCWSTR -> "wstr" ; szAttribute : LPCWSTR -> "wstr" ; lpValueBuf : LPWSTR optional, out -> "intptr" ; pcchValueBuf : DWORD* optional, in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msi = windows.NewLazySystemDLL("msi.dll")
procMsiGetProductInfoW = msi.NewProc("MsiGetProductInfoW")
)
// szProduct (LPCWSTR), szAttribute (LPCWSTR), lpValueBuf (LPWSTR optional, out), pcchValueBuf (DWORD* optional, in/out)
r1, _, err := procMsiGetProductInfoW.Call(
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(szProduct))),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(szAttribute))),
uintptr(lpValueBuf),
uintptr(pcchValueBuf),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction MsiGetProductInfoW(
szProduct: PWideChar; // LPCWSTR
szAttribute: PWideChar; // LPCWSTR
lpValueBuf: PWideChar; // LPWSTR optional, out
pcchValueBuf: Pointer // DWORD* optional, in/out
): DWORD; stdcall;
external 'msi.dll' name 'MsiGetProductInfoW';result := DllCall("msi\MsiGetProductInfoW"
, "WStr", szProduct ; LPCWSTR
, "WStr", szAttribute ; LPCWSTR
, "Ptr", lpValueBuf ; LPWSTR optional, out
, "Ptr", pcchValueBuf ; DWORD* optional, in/out
, "UInt") ; return: DWORD●MsiGetProductInfoW(szProduct, szAttribute, lpValueBuf, pcchValueBuf) = DLL("msi.dll", "dword MsiGetProductInfoW(char*, char*, char*, void*)")
# 呼び出し: MsiGetProductInfoW(szProduct, szAttribute, lpValueBuf, pcchValueBuf)
# szProduct : LPCWSTR -> "char*"
# szAttribute : LPCWSTR -> "char*"
# lpValueBuf : LPWSTR optional, out -> "char*"
# pcchValueBuf : DWORD* optional, in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。const std = @import("std");
extern "msi" fn MsiGetProductInfoW(
szProduct: [*c]const u16, // LPCWSTR
szAttribute: [*c]const u16, // LPCWSTR
lpValueBuf: [*c]u16, // LPWSTR optional, out
pcchValueBuf: [*c]u32 // DWORD* optional, in/out
) callconv(std.os.windows.WINAPI) u32;
// Unicode(-W): UTF-16LE のヌル終端バッファ([*c]const u16)を渡す。proc MsiGetProductInfoW(
szProduct: WideCString, # LPCWSTR
szAttribute: WideCString, # LPCWSTR
lpValueBuf: ptr uint16, # LPWSTR optional, out
pcchValueBuf: ptr uint32 # DWORD* optional, in/out
): uint32 {.importc: "MsiGetProductInfoW", stdcall, dynlib: "msi.dll".}
# Unicode(-W): WideCString は newWideCString("...") で生成。pragma(lib, "msi");
extern(Windows)
uint MsiGetProductInfoW(
const(wchar)* szProduct, // LPCWSTR
const(wchar)* szAttribute, // LPCWSTR
wchar* lpValueBuf, // LPWSTR optional, out
uint* pcchValueBuf // DWORD* optional, in/out
);ccall((:MsiGetProductInfoW, "msi.dll"), stdcall, UInt32,
(Cwstring, Cwstring, Ptr{UInt16}, Ptr{UInt32}),
szProduct, szAttribute, lpValueBuf, pcchValueBuf)
# szProduct : LPCWSTR -> Cwstring
# szAttribute : LPCWSTR -> Cwstring
# lpValueBuf : LPWSTR optional, out -> Ptr{UInt16}
# pcchValueBuf : DWORD* optional, in/out -> Ptr{UInt32}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
# Unicode(-W): Cwstring には transcode(UInt16, "...") 等で UTF-16 を渡す。local ffi = require("ffi")
ffi.cdef[[
uint32_t MsiGetProductInfoW(
const uint16_t* szProduct,
const uint16_t* szAttribute,
uint16_t* lpValueBuf,
uint32_t* pcchValueBuf);
]]
local msi = ffi.load("msi")
-- msi.MsiGetProductInfoW(szProduct, szAttribute, lpValueBuf, pcchValueBuf)
-- szProduct : LPCWSTR
-- szAttribute : LPCWSTR
-- lpValueBuf : LPWSTR optional, out
-- pcchValueBuf : 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('msi.dll');
const MsiGetProductInfoW = lib.func('__stdcall', 'MsiGetProductInfoW', 'uint32_t', ['str16', 'str16', 'uint16_t *', 'uint32_t *']);
// MsiGetProductInfoW(szProduct, szAttribute, lpValueBuf, pcchValueBuf)
// szProduct : LPCWSTR -> 'str16'
// szAttribute : LPCWSTR -> 'str16'
// lpValueBuf : LPWSTR optional, out -> 'uint16_t *'
// pcchValueBuf : DWORD* optional, in/out -> 'uint32_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("msi.dll", {
MsiGetProductInfoW: { parameters: ["buffer", "buffer", "buffer", "pointer"], result: "u32" },
});
// lib.symbols.MsiGetProductInfoW(szProduct, szAttribute, lpValueBuf, pcchValueBuf)
// szProduct : LPCWSTR -> "buffer"
// szAttribute : LPCWSTR -> "buffer"
// lpValueBuf : LPWSTR optional, out -> "buffer"
// pcchValueBuf : 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 MsiGetProductInfoW(
const uint16_t* szProduct,
const uint16_t* szAttribute,
uint16_t* lpValueBuf,
uint32_t* pcchValueBuf);
C, "msi.dll");
// $ffi->MsiGetProductInfoW(szProduct, szAttribute, lpValueBuf, pcchValueBuf);
// szProduct : LPCWSTR
// szAttribute : LPCWSTR
// lpValueBuf : LPWSTR optional, out
// pcchValueBuf : 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 Msi extends StdCallLibrary {
Msi INSTANCE = Native.load("msi", Msi.class, W32APIOptions.UNICODE_OPTIONS);
int MsiGetProductInfoW(
WString szProduct, // LPCWSTR
WString szAttribute, // LPCWSTR
char[] lpValueBuf, // LPWSTR optional, out
IntByReference pcchValueBuf // DWORD* optional, in/out
);
}
// Unicode(-W): WString(入力)/char[](出力)で UTF-16 をマーシャリング。@[Link("msi")]
lib Libmsi
fun MsiGetProductInfoW = MsiGetProductInfoW(
szProduct : UInt16*, # LPCWSTR
szAttribute : UInt16*, # LPCWSTR
lpValueBuf : UInt16*, # LPWSTR optional, out
pcchValueBuf : 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 MsiGetProductInfoWNative = Uint32 Function(Pointer<Utf16>, Pointer<Utf16>, Pointer<Utf16>, Pointer<Uint32>);
typedef MsiGetProductInfoWDart = int Function(Pointer<Utf16>, Pointer<Utf16>, Pointer<Utf16>, Pointer<Uint32>);
final MsiGetProductInfoW = DynamicLibrary.open('msi.dll')
.lookupFunction<MsiGetProductInfoWNative, MsiGetProductInfoWDart>('MsiGetProductInfoW');
// szProduct : LPCWSTR -> Pointer<Utf16>
// szAttribute : LPCWSTR -> Pointer<Utf16>
// lpValueBuf : LPWSTR optional, out -> Pointer<Utf16>
// pcchValueBuf : DWORD* optional, in/out -> Pointer<Uint32>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function MsiGetProductInfoW(
szProduct: PWideChar; // LPCWSTR
szAttribute: PWideChar; // LPCWSTR
lpValueBuf: PWideChar; // LPWSTR optional, out
pcchValueBuf: Pointer // DWORD* optional, in/out
): DWORD; stdcall;
external 'msi.dll' name 'MsiGetProductInfoW';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "MsiGetProductInfoW"
c_MsiGetProductInfoW :: CWString -> CWString -> CWString -> Ptr Word32 -> IO Word32
-- szProduct : LPCWSTR -> CWString
-- szAttribute : LPCWSTR -> CWString
-- lpValueBuf : LPWSTR optional, out -> CWString
-- pcchValueBuf : DWORD* optional, in/out -> Ptr Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let msigetproductinfow =
foreign "MsiGetProductInfoW"
((ptr uint16_t) @-> (ptr uint16_t) @-> (ptr uint16_t) @-> (ptr uint32_t) @-> returning uint32_t)
(* szProduct : LPCWSTR -> (ptr uint16_t) *)
(* szAttribute : LPCWSTR -> (ptr uint16_t) *)
(* lpValueBuf : LPWSTR optional, out -> (ptr uint16_t) *)
(* pcchValueBuf : DWORD* optional, in/out -> (ptr uint32_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library msi (t "msi.dll"))
(cffi:use-foreign-library msi)
(cffi:defcfun ("MsiGetProductInfoW" msi-get-product-info-w :convention :stdcall) :uint32
(sz-product (:string :encoding :utf-16le)) ; LPCWSTR
(sz-attribute (:string :encoding :utf-16le)) ; LPCWSTR
(lp-value-buf :pointer) ; LPWSTR optional, out
(pcch-value-buf :pointer)) ; DWORD* optional, in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $MsiGetProductInfoW = Win32::API::More->new('msi',
'DWORD MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute, LPWSTR lpValueBuf, LPVOID pcchValueBuf)');
# my $ret = $MsiGetProductInfoW->Call($szProduct, $szAttribute, $lpValueBuf, $pcchValueBuf);
# szProduct : LPCWSTR -> LPCWSTR
# szAttribute : LPCWSTR -> LPCWSTR
# lpValueBuf : LPWSTR optional, out -> LPWSTR
# pcchValueBuf : DWORD* optional, in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。
# Unicode(-W): LPCWSTR/LPWSTR は Win32::API が UTF-16 変換を行う。関連項目
- f MsiGetProductInfoA (ANSI版) — インストール済み製品の属性情報を取得する(ANSI版)。
- f MsiGetProductInfoExW — インストールコンテキストを指定して製品情報を取得する(Unicode版)。