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