MsiSourceListClearMediaDiskW
関数シグネチャ
// msi.dll (Unicode / -W)
#include <windows.h>
DWORD MsiSourceListClearMediaDiskW(
LPCWSTR szProductCodeOrPatchCode,
LPCWSTR szUserSid, // optional
MSIINSTALLCONTEXT dwContext,
DWORD dwOptions,
DWORD dwDiskId
);パラメーター
| 名前 | 型 | 方向 | 説明 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| szProductCodeOrPatchCode | LPCWSTR | in | 製品またはパッチの ProductCode またはパッチ GUID です。null 終端文字列を使用します。文字列が 39 文字を超える場合、関数は失敗し ERROR_INVALID_PARAMETER を返します。このパラメーターを NULL にすることはできません。 | ||||||||
| szUserSid | LPCWSTR | inoptional | このパラメーターには、製品またはパッチを含むユーザーアカウントを指定する文字列形式の SID を指定できます。SID は検証も解決もされません。誤った SID を指定すると ERROR_UNKNOWN_PRODUCT または ERROR_UNKNOWN_PATCH が返されることがあります。
Note 特別な SID 文字列 s-1-5-18 (system) は、per-machine としてインストールされた製品やパッチの列挙には使用できません。SID 値に s-1-5-18 を設定すると ERROR_INVALID_PARAMETER が返されます。dwContext を MSIINSTALLCONTEXT_MACHINE のみに設定する場合、szUserSid は NULL でなければなりません。
Note 特別な SID 文字列 s-1-1-0 (everyone) は使用しないでください。SID 値に s-1-1-0 を設定すると失敗し ERROR_INVALID_PARAM が返されます。
| ||||||||
| dwContext | MSIINSTALLCONTEXT | in | このパラメーターは、製品またはパッチのインスタンスのコンテキストを指定します。このパラメーターには次のいずれかの値を指定できます。
| ||||||||
| dwOptions | DWORD | in | dwOptions の値は szProductCodeOrPatchCode の意味を指定します。
| ||||||||
| dwDiskId | DWORD | in | このパラメーターは、削除するディスクの ID を指定します。 |
戻り値の型: DWORD
公式ドキュメント
MsiSourceListClearMediaDisk 関数は、特定のコンテキストにおいて、製品またはパッチのメディアソースの下に登録されている既存のディスクを削除する機能を提供します。(Unicode)
戻り値
MsiSourceListClearMediaDisk 関数は次の値を返します。
| 値 | 意味 |
|---|---|
| ユーザーに、指定されたメディアソース、または指定された製品やパッチを読み取る権限がありません。これは、メディアソース、製品、またはパッチが見つかったかどうかを示すものではありません。 | |
| 構成データが破損しています。 | |
| Windows Installer サービスにアクセスできませんでした。 | |
| 無効なパラメーターが関数に渡されました。 | |
| 値が正常に削除されたか、または見つかりませんでした。 | |
| パッチが見つかりませんでした。 | |
| 製品が見つかりませんでした。 | |
| 予期しない内部エラーが発生しました。 |
解説(Remarks)
管理者は、machine コンテキストの下に存在する製品やパッチのインスタンス、または自身の per-user コンテキスト (managed または unmanaged) の下に存在する製品やパッチのインスタンスのインストールを変更できます。また、任意のユーザーの per-user-managed コンテキストの下に存在する製品やパッチのインスタンスのインストールも変更できます。ただし、管理者は、他のユーザーの per-user-unmanaged コンテキストの下に存在する、その他ユーザーによる製品やパッチのインスタンスのインストールを変更することはできません。
非管理者は、他のユーザーの per-user コンテキスト (managed または unmanaged) の下に存在する製品やパッチのインスタンスのインストールを変更できません。自身の per-user-unmanaged コンテキストの下に存在する製品やパッチのインスタンスのインストールは変更できます。machine コンテキストまたは自身の per-user-managed コンテキストの下にある製品やパッチのインスタンスのインストールは、製品やパッチのソースを参照することが許可されている場合に限り変更できます。ユーザーがソースを参照できるようにするには、ポリシーを設定します。詳細については、DisableBrowse、AllowLockdownBrowse、AlwaysInstallElevated の各ポリシーを参照してください。
msi.h ヘッダーは、UNICODE プリプロセッサ定数の定義に基づいて、この関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして MsiSourceListClearMediaDisk を定義します。エンコーディング中立のエイリアスの使用を、エンコーディング中立でないコードと混在させると、不一致が生じ、コンパイルエラーや実行時エラーを引き起こす可能性があります。詳細については、関数プロトタイプの規則 を参照してください。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// msi.dll (Unicode / -W)
#include <windows.h>
DWORD MsiSourceListClearMediaDiskW(
LPCWSTR szProductCodeOrPatchCode,
LPCWSTR szUserSid, // optional
MSIINSTALLCONTEXT dwContext,
DWORD dwOptions,
DWORD dwDiskId
);[DllImport("msi.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern uint MsiSourceListClearMediaDiskW(
[MarshalAs(UnmanagedType.LPWStr)] string szProductCodeOrPatchCode, // LPCWSTR
[MarshalAs(UnmanagedType.LPWStr)] string szUserSid, // LPCWSTR optional
int dwContext, // MSIINSTALLCONTEXT
uint dwOptions, // DWORD
uint dwDiskId // DWORD
);<DllImport("msi.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function MsiSourceListClearMediaDiskW(
<MarshalAs(UnmanagedType.LPWStr)> szProductCodeOrPatchCode As String, ' LPCWSTR
<MarshalAs(UnmanagedType.LPWStr)> szUserSid As String, ' LPCWSTR optional
dwContext As Integer, ' MSIINSTALLCONTEXT
dwOptions As UInteger, ' DWORD
dwDiskId As UInteger ' DWORD
) As UInteger
End Function' szProductCodeOrPatchCode : LPCWSTR
' szUserSid : LPCWSTR optional
' dwContext : MSIINSTALLCONTEXT
' dwOptions : DWORD
' dwDiskId : DWORD
Declare PtrSafe Function MsiSourceListClearMediaDiskW Lib "msi" ( _
ByVal szProductCodeOrPatchCode As LongPtr, _
ByVal szUserSid As LongPtr, _
ByVal dwContext As Long, _
ByVal dwOptions As Long, _
ByVal dwDiskId 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
MsiSourceListClearMediaDiskW = ctypes.windll.msi.MsiSourceListClearMediaDiskW
MsiSourceListClearMediaDiskW.restype = wintypes.DWORD
MsiSourceListClearMediaDiskW.argtypes = [
wintypes.LPCWSTR, # szProductCodeOrPatchCode : LPCWSTR
wintypes.LPCWSTR, # szUserSid : LPCWSTR optional
ctypes.c_int, # dwContext : MSIINSTALLCONTEXT
wintypes.DWORD, # dwOptions : DWORD
wintypes.DWORD, # dwDiskId : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('msi.dll')
MsiSourceListClearMediaDiskW = Fiddle::Function.new(
lib['MsiSourceListClearMediaDiskW'],
[
Fiddle::TYPE_VOIDP, # szProductCodeOrPatchCode : LPCWSTR
Fiddle::TYPE_VOIDP, # szUserSid : LPCWSTR optional
Fiddle::TYPE_INT, # dwContext : MSIINSTALLCONTEXT
-Fiddle::TYPE_INT, # dwOptions : DWORD
-Fiddle::TYPE_INT, # dwDiskId : DWORD
],
-Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "msi")]
extern "system" {
fn MsiSourceListClearMediaDiskW(
szProductCodeOrPatchCode: *const u16, // LPCWSTR
szUserSid: *const u16, // LPCWSTR optional
dwContext: i32, // MSIINSTALLCONTEXT
dwOptions: u32, // DWORD
dwDiskId: u32 // DWORD
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("msi.dll", CharSet = CharSet.Unicode)]
public static extern uint MsiSourceListClearMediaDiskW([MarshalAs(UnmanagedType.LPWStr)] string szProductCodeOrPatchCode, [MarshalAs(UnmanagedType.LPWStr)] string szUserSid, int dwContext, uint dwOptions, uint dwDiskId);
"@
$api = Add-Type -MemberDefinition $sig -Name 'msi_MsiSourceListClearMediaDiskW' -Namespace Win32 -PassThru
# $api::MsiSourceListClearMediaDiskW(szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId)#uselib "msi.dll"
#func global MsiSourceListClearMediaDiskW "MsiSourceListClearMediaDiskW" wptr, wptr, wptr, wptr, wptr
; MsiSourceListClearMediaDiskW szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId ; 戻り値は stat
; szProductCodeOrPatchCode : LPCWSTR -> "wptr"
; szUserSid : LPCWSTR optional -> "wptr"
; dwContext : MSIINSTALLCONTEXT -> "wptr"
; dwOptions : DWORD -> "wptr"
; dwDiskId : DWORD -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "msi.dll"
#cfunc global MsiSourceListClearMediaDiskW "MsiSourceListClearMediaDiskW" wstr, wstr, int, int, int
; res = MsiSourceListClearMediaDiskW(szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId)
; szProductCodeOrPatchCode : LPCWSTR -> "wstr"
; szUserSid : LPCWSTR optional -> "wstr"
; dwContext : MSIINSTALLCONTEXT -> "int"
; dwOptions : DWORD -> "int"
; dwDiskId : DWORD -> "int"; DWORD MsiSourceListClearMediaDiskW(LPCWSTR szProductCodeOrPatchCode, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId)
#uselib "msi.dll"
#cfunc global MsiSourceListClearMediaDiskW "MsiSourceListClearMediaDiskW" wstr, wstr, int, int, int
; res = MsiSourceListClearMediaDiskW(szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId)
; szProductCodeOrPatchCode : LPCWSTR -> "wstr"
; szUserSid : LPCWSTR optional -> "wstr"
; dwContext : MSIINSTALLCONTEXT -> "int"
; dwOptions : DWORD -> "int"
; dwDiskId : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msi = windows.NewLazySystemDLL("msi.dll")
procMsiSourceListClearMediaDiskW = msi.NewProc("MsiSourceListClearMediaDiskW")
)
// szProductCodeOrPatchCode (LPCWSTR), szUserSid (LPCWSTR optional), dwContext (MSIINSTALLCONTEXT), dwOptions (DWORD), dwDiskId (DWORD)
r1, _, err := procMsiSourceListClearMediaDiskW.Call(
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(szProductCodeOrPatchCode))),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(szUserSid))),
uintptr(dwContext),
uintptr(dwOptions),
uintptr(dwDiskId),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction MsiSourceListClearMediaDiskW(
szProductCodeOrPatchCode: PWideChar; // LPCWSTR
szUserSid: PWideChar; // LPCWSTR optional
dwContext: Integer; // MSIINSTALLCONTEXT
dwOptions: DWORD; // DWORD
dwDiskId: DWORD // DWORD
): DWORD; stdcall;
external 'msi.dll' name 'MsiSourceListClearMediaDiskW';result := DllCall("msi\MsiSourceListClearMediaDiskW"
, "WStr", szProductCodeOrPatchCode ; LPCWSTR
, "WStr", szUserSid ; LPCWSTR optional
, "Int", dwContext ; MSIINSTALLCONTEXT
, "UInt", dwOptions ; DWORD
, "UInt", dwDiskId ; DWORD
, "UInt") ; return: DWORD●MsiSourceListClearMediaDiskW(szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId) = DLL("msi.dll", "dword MsiSourceListClearMediaDiskW(char*, char*, int, dword, dword)")
# 呼び出し: MsiSourceListClearMediaDiskW(szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId)
# szProductCodeOrPatchCode : LPCWSTR -> "char*"
# szUserSid : LPCWSTR optional -> "char*"
# dwContext : MSIINSTALLCONTEXT -> "int"
# dwOptions : DWORD -> "dword"
# dwDiskId : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。const std = @import("std");
extern "msi" fn MsiSourceListClearMediaDiskW(
szProductCodeOrPatchCode: [*c]const u16, // LPCWSTR
szUserSid: [*c]const u16, // LPCWSTR optional
dwContext: i32, // MSIINSTALLCONTEXT
dwOptions: u32, // DWORD
dwDiskId: u32 // DWORD
) callconv(std.os.windows.WINAPI) u32;
// Unicode(-W): UTF-16LE のヌル終端バッファ([*c]const u16)を渡す。proc MsiSourceListClearMediaDiskW(
szProductCodeOrPatchCode: WideCString, # LPCWSTR
szUserSid: WideCString, # LPCWSTR optional
dwContext: int32, # MSIINSTALLCONTEXT
dwOptions: uint32, # DWORD
dwDiskId: uint32 # DWORD
): uint32 {.importc: "MsiSourceListClearMediaDiskW", stdcall, dynlib: "msi.dll".}
# Unicode(-W): WideCString は newWideCString("...") で生成。pragma(lib, "msi");
extern(Windows)
uint MsiSourceListClearMediaDiskW(
const(wchar)* szProductCodeOrPatchCode, // LPCWSTR
const(wchar)* szUserSid, // LPCWSTR optional
int dwContext, // MSIINSTALLCONTEXT
uint dwOptions, // DWORD
uint dwDiskId // DWORD
);ccall((:MsiSourceListClearMediaDiskW, "msi.dll"), stdcall, UInt32,
(Cwstring, Cwstring, Int32, UInt32, UInt32),
szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId)
# szProductCodeOrPatchCode : LPCWSTR -> Cwstring
# szUserSid : LPCWSTR optional -> Cwstring
# dwContext : MSIINSTALLCONTEXT -> Int32
# dwOptions : DWORD -> UInt32
# dwDiskId : DWORD -> UInt32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
# Unicode(-W): Cwstring には transcode(UInt16, "...") 等で UTF-16 を渡す。local ffi = require("ffi")
ffi.cdef[[
uint32_t MsiSourceListClearMediaDiskW(
const uint16_t* szProductCodeOrPatchCode,
const uint16_t* szUserSid,
int32_t dwContext,
uint32_t dwOptions,
uint32_t dwDiskId);
]]
local msi = ffi.load("msi")
-- msi.MsiSourceListClearMediaDiskW(szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId)
-- szProductCodeOrPatchCode : LPCWSTR
-- szUserSid : LPCWSTR optional
-- dwContext : MSIINSTALLCONTEXT
-- dwOptions : DWORD
-- dwDiskId : DWORD
-- 構造体/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 MsiSourceListClearMediaDiskW = lib.func('__stdcall', 'MsiSourceListClearMediaDiskW', 'uint32_t', ['str16', 'str16', 'int32_t', 'uint32_t', 'uint32_t']);
// MsiSourceListClearMediaDiskW(szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId)
// szProductCodeOrPatchCode : LPCWSTR -> 'str16'
// szUserSid : LPCWSTR optional -> 'str16'
// dwContext : MSIINSTALLCONTEXT -> 'int32_t'
// dwOptions : DWORD -> 'uint32_t'
// dwDiskId : DWORD -> 'uint32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("msi.dll", {
MsiSourceListClearMediaDiskW: { parameters: ["buffer", "buffer", "i32", "u32", "u32"], result: "u32" },
});
// lib.symbols.MsiSourceListClearMediaDiskW(szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId)
// szProductCodeOrPatchCode : LPCWSTR -> "buffer"
// szUserSid : LPCWSTR optional -> "buffer"
// dwContext : MSIINSTALLCONTEXT -> "i32"
// dwOptions : DWORD -> "u32"
// dwDiskId : DWORD -> "u32"
// 文字列は "buffer"。Unicode(-W) は new TextEncoder() ではなく UTF-16LE のバイト列(末尾に \x00\x00)を Uint8Array で渡す。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
uint32_t MsiSourceListClearMediaDiskW(
const uint16_t* szProductCodeOrPatchCode,
const uint16_t* szUserSid,
int32_t dwContext,
uint32_t dwOptions,
uint32_t dwDiskId);
C, "msi.dll");
// $ffi->MsiSourceListClearMediaDiskW(szProductCodeOrPatchCode, szUserSid, dwContext, dwOptions, dwDiskId);
// szProductCodeOrPatchCode : LPCWSTR
// szUserSid : LPCWSTR optional
// dwContext : MSIINSTALLCONTEXT
// dwOptions : DWORD
// dwDiskId : DWORD
// 構造体/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 MsiSourceListClearMediaDiskW(
WString szProductCodeOrPatchCode, // LPCWSTR
WString szUserSid, // LPCWSTR optional
int dwContext, // MSIINSTALLCONTEXT
int dwOptions, // DWORD
int dwDiskId // DWORD
);
}
// Unicode(-W): WString(入力)/char[](出力)で UTF-16 をマーシャリング。@[Link("msi")]
lib Libmsi
fun MsiSourceListClearMediaDiskW = MsiSourceListClearMediaDiskW(
szProductCodeOrPatchCode : UInt16*, # LPCWSTR
szUserSid : UInt16*, # LPCWSTR optional
dwContext : Int32, # MSIINSTALLCONTEXT
dwOptions : UInt32, # DWORD
dwDiskId : UInt32 # DWORD
) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef MsiSourceListClearMediaDiskWNative = Uint32 Function(Pointer<Utf16>, Pointer<Utf16>, Int32, Uint32, Uint32);
typedef MsiSourceListClearMediaDiskWDart = int Function(Pointer<Utf16>, Pointer<Utf16>, int, int, int);
final MsiSourceListClearMediaDiskW = DynamicLibrary.open('msi.dll')
.lookupFunction<MsiSourceListClearMediaDiskWNative, MsiSourceListClearMediaDiskWDart>('MsiSourceListClearMediaDiskW');
// szProductCodeOrPatchCode : LPCWSTR -> Pointer<Utf16>
// szUserSid : LPCWSTR optional -> Pointer<Utf16>
// dwContext : MSIINSTALLCONTEXT -> Int32
// dwOptions : DWORD -> Uint32
// dwDiskId : DWORD -> Uint32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function MsiSourceListClearMediaDiskW(
szProductCodeOrPatchCode: PWideChar; // LPCWSTR
szUserSid: PWideChar; // LPCWSTR optional
dwContext: Integer; // MSIINSTALLCONTEXT
dwOptions: DWORD; // DWORD
dwDiskId: DWORD // DWORD
): DWORD; stdcall;
external 'msi.dll' name 'MsiSourceListClearMediaDiskW';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "MsiSourceListClearMediaDiskW"
c_MsiSourceListClearMediaDiskW :: CWString -> CWString -> Int32 -> Word32 -> Word32 -> IO Word32
-- szProductCodeOrPatchCode : LPCWSTR -> CWString
-- szUserSid : LPCWSTR optional -> CWString
-- dwContext : MSIINSTALLCONTEXT -> Int32
-- dwOptions : DWORD -> Word32
-- dwDiskId : DWORD -> Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let msisourcelistclearmediadiskw =
foreign "MsiSourceListClearMediaDiskW"
((ptr uint16_t) @-> (ptr uint16_t) @-> int32_t @-> uint32_t @-> uint32_t @-> returning uint32_t)
(* szProductCodeOrPatchCode : LPCWSTR -> (ptr uint16_t) *)
(* szUserSid : LPCWSTR optional -> (ptr uint16_t) *)
(* dwContext : MSIINSTALLCONTEXT -> int32_t *)
(* dwOptions : DWORD -> uint32_t *)
(* dwDiskId : DWORD -> uint32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library msi (t "msi.dll"))
(cffi:use-foreign-library msi)
(cffi:defcfun ("MsiSourceListClearMediaDiskW" msi-source-list-clear-media-disk-w :convention :stdcall) :uint32
(sz-product-code-or-patch-code (:string :encoding :utf-16le)) ; LPCWSTR
(sz-user-sid (:string :encoding :utf-16le)) ; LPCWSTR optional
(dw-context :int32) ; MSIINSTALLCONTEXT
(dw-options :uint32) ; DWORD
(dw-disk-id :uint32)) ; DWORD
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $MsiSourceListClearMediaDiskW = Win32::API::More->new('msi',
'DWORD MsiSourceListClearMediaDiskW(LPCWSTR szProductCodeOrPatchCode, LPCWSTR szUserSid, int dwContext, DWORD dwOptions, DWORD dwDiskId)');
# my $ret = $MsiSourceListClearMediaDiskW->Call($szProductCodeOrPatchCode, $szUserSid, $dwContext, $dwOptions, $dwDiskId);
# szProductCodeOrPatchCode : LPCWSTR -> LPCWSTR
# szUserSid : LPCWSTR optional -> LPCWSTR
# dwContext : MSIINSTALLCONTEXT -> int
# dwOptions : DWORD -> DWORD
# dwDiskId : DWORD -> DWORD
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。
# Unicode(-W): LPCWSTR/LPWSTR は Win32::API が UTF-16 変換を行う。関連項目
- f MsiSourceListClearMediaDiskA (ANSI版) — ソースリストから指定IDのメディアディスク登録を削除する。