ホーム › System.ApplicationInstallationAndServicing › MsiViewExecute
MsiViewExecute
関数パラメータレコードを与えてビューのクエリを実行する。
シグネチャ
// msi.dll
#include <windows.h>
DWORD MsiViewExecute(
MSIHANDLE hView,
MSIHANDLE hRecord
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hView | MSIHANDLE | in |
| hRecord | MSIHANDLE | in |
戻り値の型: DWORD
各言語での呼び出し定義
// msi.dll
#include <windows.h>
DWORD MsiViewExecute(
MSIHANDLE hView,
MSIHANDLE hRecord
);[DllImport("msi.dll", ExactSpelling = true)]
static extern uint MsiViewExecute(
uint hView, // MSIHANDLE
uint hRecord // MSIHANDLE
);<DllImport("msi.dll", ExactSpelling:=True)>
Public Shared Function MsiViewExecute(
hView As UInteger, ' MSIHANDLE
hRecord As UInteger ' MSIHANDLE
) As UInteger
End Function' hView : MSIHANDLE
' hRecord : MSIHANDLE
Declare PtrSafe Function MsiViewExecute Lib "msi" ( _
ByVal hView As Long, _
ByVal hRecord As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MsiViewExecute = ctypes.windll.msi.MsiViewExecute
MsiViewExecute.restype = wintypes.DWORD
MsiViewExecute.argtypes = [
wintypes.DWORD, # hView : MSIHANDLE
wintypes.DWORD, # hRecord : MSIHANDLE
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('msi.dll')
MsiViewExecute = Fiddle::Function.new(
lib['MsiViewExecute'],
[
-Fiddle::TYPE_INT, # hView : MSIHANDLE
-Fiddle::TYPE_INT, # hRecord : MSIHANDLE
],
-Fiddle::TYPE_INT)#[link(name = "msi")]
extern "system" {
fn MsiViewExecute(
hView: u32, // MSIHANDLE
hRecord: u32 // MSIHANDLE
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("msi.dll")]
public static extern uint MsiViewExecute(uint hView, uint hRecord);
"@
$api = Add-Type -MemberDefinition $sig -Name 'msi_MsiViewExecute' -Namespace Win32 -PassThru
# $api::MsiViewExecute(hView, hRecord)#uselib "msi.dll"
#func global MsiViewExecute "MsiViewExecute" sptr, sptr
; MsiViewExecute hView, hRecord ; 戻り値は stat
; hView : MSIHANDLE -> "sptr"
; hRecord : MSIHANDLE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "msi.dll"
#cfunc global MsiViewExecute "MsiViewExecute" int, int
; res = MsiViewExecute(hView, hRecord)
; hView : MSIHANDLE -> "int"
; hRecord : MSIHANDLE -> "int"; DWORD MsiViewExecute(MSIHANDLE hView, MSIHANDLE hRecord)
#uselib "msi.dll"
#cfunc global MsiViewExecute "MsiViewExecute" int, int
; res = MsiViewExecute(hView, hRecord)
; hView : MSIHANDLE -> "int"
; hRecord : MSIHANDLE -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msi = windows.NewLazySystemDLL("msi.dll")
procMsiViewExecute = msi.NewProc("MsiViewExecute")
)
// hView (MSIHANDLE), hRecord (MSIHANDLE)
r1, _, err := procMsiViewExecute.Call(
uintptr(hView),
uintptr(hRecord),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction MsiViewExecute(
hView: DWORD; // MSIHANDLE
hRecord: DWORD // MSIHANDLE
): DWORD; stdcall;
external 'msi.dll' name 'MsiViewExecute';result := DllCall("msi\MsiViewExecute"
, "UInt", hView ; MSIHANDLE
, "UInt", hRecord ; MSIHANDLE
, "UInt") ; return: DWORD●MsiViewExecute(hView, hRecord) = DLL("msi.dll", "dword MsiViewExecute(dword, dword)")
# 呼び出し: MsiViewExecute(hView, hRecord)
# hView : MSIHANDLE -> "dword"
# hRecord : MSIHANDLE -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。