ホーム › Storage.FileSystem › LZInit
LZInit
関数LZ展開用にソースファイルを初期化する。
シグネチャ
// KERNEL32.dll
#include <windows.h>
INT LZInit(
INT hfSource
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hfSource | INT | in |
戻り値の型: INT
各言語での呼び出し定義
// KERNEL32.dll
#include <windows.h>
INT LZInit(
INT hfSource
);[DllImport("KERNEL32.dll", ExactSpelling = true)]
static extern int LZInit(
int hfSource // INT
);<DllImport("KERNEL32.dll", ExactSpelling:=True)>
Public Shared Function LZInit(
hfSource As Integer ' INT
) As Integer
End Function' hfSource : INT
Declare PtrSafe Function LZInit Lib "kernel32" ( _
ByVal hfSource As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
LZInit = ctypes.windll.kernel32.LZInit
LZInit.restype = ctypes.c_int
LZInit.argtypes = [
ctypes.c_int, # hfSource : INT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('KERNEL32.dll')
LZInit = Fiddle::Function.new(
lib['LZInit'],
[
Fiddle::TYPE_INT, # hfSource : INT
],
Fiddle::TYPE_INT)#[link(name = "kernel32")]
extern "system" {
fn LZInit(
hfSource: i32 // INT
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("KERNEL32.dll")]
public static extern int LZInit(int hfSource);
"@
$api = Add-Type -MemberDefinition $sig -Name 'KERNEL32_LZInit' -Namespace Win32 -PassThru
# $api::LZInit(hfSource)#uselib "KERNEL32.dll"
#func global LZInit "LZInit" sptr
; LZInit hfSource ; 戻り値は stat
; hfSource : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "KERNEL32.dll"
#cfunc global LZInit "LZInit" int
; res = LZInit(hfSource)
; hfSource : INT -> "int"; INT LZInit(INT hfSource)
#uselib "KERNEL32.dll"
#cfunc global LZInit "LZInit" int
; res = LZInit(hfSource)
; hfSource : INT -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
kernel32 = windows.NewLazySystemDLL("KERNEL32.dll")
procLZInit = kernel32.NewProc("LZInit")
)
// hfSource (INT)
r1, _, err := procLZInit.Call(
uintptr(hfSource),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction LZInit(
hfSource: Integer // INT
): Integer; stdcall;
external 'KERNEL32.dll' name 'LZInit';result := DllCall("KERNEL32\LZInit"
, "Int", hfSource ; INT
, "Int") ; return: INT●LZInit(hfSource) = DLL("KERNEL32.dll", "int LZInit(int)")
# 呼び出し: LZInit(hfSource)
# hfSource : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。