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

MsiViewClose

関数
実行中のビューを閉じてフェッチ処理を終了する。
DLLmsi.dll呼出規約winapi対応OSwindows8.0

シグネチャ

// msi.dll
#include <windows.h>

DWORD MsiViewClose(
    MSIHANDLE hView
);

パラメーター

名前方向
hViewMSIHANDLEin

戻り値の型: DWORD

各言語での呼び出し定義

// msi.dll
#include <windows.h>

DWORD MsiViewClose(
    MSIHANDLE hView
);
[DllImport("msi.dll", ExactSpelling = true)]
static extern uint MsiViewClose(
    uint hView   // MSIHANDLE
);
<DllImport("msi.dll", ExactSpelling:=True)>
Public Shared Function MsiViewClose(
    hView As UInteger   ' MSIHANDLE
) As UInteger
End Function
' hView : MSIHANDLE
Declare PtrSafe Function MsiViewClose Lib "msi" ( _
    ByVal hView As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

MsiViewClose = ctypes.windll.msi.MsiViewClose
MsiViewClose.restype = wintypes.DWORD
MsiViewClose.argtypes = [
    wintypes.DWORD,  # hView : MSIHANDLE
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('msi.dll')
MsiViewClose = Fiddle::Function.new(
  lib['MsiViewClose'],
  [
    -Fiddle::TYPE_INT,  # hView : MSIHANDLE
  ],
  -Fiddle::TYPE_INT)
#[link(name = "msi")]
extern "system" {
    fn MsiViewClose(
        hView: u32  // MSIHANDLE
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("msi.dll")]
public static extern uint MsiViewClose(uint hView);
"@
$api = Add-Type -MemberDefinition $sig -Name 'msi_MsiViewClose' -Namespace Win32 -PassThru
# $api::MsiViewClose(hView)
#uselib "msi.dll"
#func global MsiViewClose "MsiViewClose" sptr
; MsiViewClose hView   ; 戻り値は stat
; hView : MSIHANDLE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "msi.dll"
#cfunc global MsiViewClose "MsiViewClose" int
; res = MsiViewClose(hView)
; hView : MSIHANDLE -> "int"
; DWORD MsiViewClose(MSIHANDLE hView)
#uselib "msi.dll"
#cfunc global MsiViewClose "MsiViewClose" int
; res = MsiViewClose(hView)
; hView : MSIHANDLE -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msi = windows.NewLazySystemDLL("msi.dll")
	procMsiViewClose = msi.NewProc("MsiViewClose")
)

// hView (MSIHANDLE)
r1, _, err := procMsiViewClose.Call(
	uintptr(hView),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function MsiViewClose(
  hView: DWORD   // MSIHANDLE
): DWORD; stdcall;
  external 'msi.dll' name 'MsiViewClose';
result := DllCall("msi\MsiViewClose"
    , "UInt", hView   ; MSIHANDLE
    , "UInt")   ; return: DWORD
●MsiViewClose(hView) = DLL("msi.dll", "dword MsiViewClose(dword)")
# 呼び出し: MsiViewClose(hView)
# hView : MSIHANDLE -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。