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