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

GetDeltaInfoB

関数
バッファ上のデルタからヘッダー情報を取得する。
DLLmsdelta.dll呼出規約winapi

シグネチャ

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

BOOL GetDeltaInfoB(
    DELTA_INPUT Delta,
    DELTA_HEADER_INFO* lpHeaderInfo
);

パラメーター

名前方向
DeltaDELTA_INPUTin
lpHeaderInfoDELTA_HEADER_INFO*out

戻り値の型: BOOL

各言語での呼び出し定義

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

BOOL GetDeltaInfoB(
    DELTA_INPUT Delta,
    DELTA_HEADER_INFO* lpHeaderInfo
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("msdelta.dll", ExactSpelling = true)]
static extern bool GetDeltaInfoB(
    DELTA_INPUT Delta,   // DELTA_INPUT
    IntPtr lpHeaderInfo   // DELTA_HEADER_INFO* out
);
<DllImport("msdelta.dll", ExactSpelling:=True)>
Public Shared Function GetDeltaInfoB(
    Delta As DELTA_INPUT,   ' DELTA_INPUT
    lpHeaderInfo As IntPtr   ' DELTA_HEADER_INFO* out
) As Boolean
End Function
' Delta : DELTA_INPUT
' lpHeaderInfo : DELTA_HEADER_INFO* out
Declare PtrSafe Function GetDeltaInfoB Lib "msdelta" ( _
    ByVal Delta As LongPtr, _
    ByVal lpHeaderInfo As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GetDeltaInfoB = ctypes.windll.msdelta.GetDeltaInfoB
GetDeltaInfoB.restype = wintypes.BOOL
GetDeltaInfoB.argtypes = [
    DELTA_INPUT,  # Delta : DELTA_INPUT
    ctypes.c_void_p,  # lpHeaderInfo : DELTA_HEADER_INFO* out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('msdelta.dll')
GetDeltaInfoB = Fiddle::Function.new(
  lib['GetDeltaInfoB'],
  [
    Fiddle::TYPE_VOIDP,  # Delta : DELTA_INPUT
    Fiddle::TYPE_VOIDP,  # lpHeaderInfo : DELTA_HEADER_INFO* out
  ],
  Fiddle::TYPE_INT)
#[link(name = "msdelta")]
extern "system" {
    fn GetDeltaInfoB(
        Delta: DELTA_INPUT,  // DELTA_INPUT
        lpHeaderInfo: *mut DELTA_HEADER_INFO  // DELTA_HEADER_INFO* out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("msdelta.dll")]
public static extern bool GetDeltaInfoB(DELTA_INPUT Delta, IntPtr lpHeaderInfo);
"@
$api = Add-Type -MemberDefinition $sig -Name 'msdelta_GetDeltaInfoB' -Namespace Win32 -PassThru
# $api::GetDeltaInfoB(Delta, lpHeaderInfo)
#uselib "msdelta.dll"
#func global GetDeltaInfoB "GetDeltaInfoB" sptr, sptr
; GetDeltaInfoB Delta, varptr(lpHeaderInfo)   ; 戻り値は stat
; Delta : DELTA_INPUT -> "sptr"
; lpHeaderInfo : DELTA_HEADER_INFO* out -> "sptr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "msdelta.dll"
#cfunc global GetDeltaInfoB "GetDeltaInfoB" int, var
; res = GetDeltaInfoB(Delta, lpHeaderInfo)
; Delta : DELTA_INPUT -> "int"
; lpHeaderInfo : DELTA_HEADER_INFO* out -> "var"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; BOOL GetDeltaInfoB(DELTA_INPUT Delta, DELTA_HEADER_INFO* lpHeaderInfo)
#uselib "msdelta.dll"
#cfunc global GetDeltaInfoB "GetDeltaInfoB" int, var
; res = GetDeltaInfoB(Delta, lpHeaderInfo)
; Delta : DELTA_INPUT -> "int"
; lpHeaderInfo : DELTA_HEADER_INFO* out -> "var"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msdelta = windows.NewLazySystemDLL("msdelta.dll")
	procGetDeltaInfoB = msdelta.NewProc("GetDeltaInfoB")
)

// Delta (DELTA_INPUT), lpHeaderInfo (DELTA_HEADER_INFO* out)
r1, _, err := procGetDeltaInfoB.Call(
	uintptr(Delta),
	uintptr(lpHeaderInfo),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function GetDeltaInfoB(
  Delta: DELTA_INPUT;   // DELTA_INPUT
  lpHeaderInfo: Pointer   // DELTA_HEADER_INFO* out
): BOOL; stdcall;
  external 'msdelta.dll' name 'GetDeltaInfoB';
result := DllCall("msdelta\GetDeltaInfoB"
    , "Ptr", Delta   ; DELTA_INPUT
    , "Ptr", lpHeaderInfo   ; DELTA_HEADER_INFO* out
    , "Int")   ; return: BOOL
●GetDeltaInfoB(Delta, lpHeaderInfo) = DLL("msdelta.dll", "bool GetDeltaInfoB(void*, void*)")
# 呼び出し: GetDeltaInfoB(Delta, lpHeaderInfo)
# Delta : DELTA_INPUT -> "void*"
# lpHeaderInfo : DELTA_HEADER_INFO* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。