Win32 API 日本語リファレンス
ホームSystem.Diagnostics.Debug › ImagehlpApiVersion

ImagehlpApiVersion

関数
ImageHlp APIのバージョン情報を取得する。
DLLdbghelp.dll呼出規約winapi

シグネチャ

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

API_VERSION* ImagehlpApiVersion(void);

パラメーターなし。戻り値: API_VERSION*

各言語での呼び出し定義

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

API_VERSION* ImagehlpApiVersion(void);
[DllImport("dbghelp.dll", ExactSpelling = true)]
static extern IntPtr ImagehlpApiVersion();
<DllImport("dbghelp.dll", ExactSpelling:=True)>
Public Shared Function ImagehlpApiVersion() As IntPtr
End Function
Declare PtrSafe Function ImagehlpApiVersion Lib "dbghelp" () As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

ImagehlpApiVersion = ctypes.windll.dbghelp.ImagehlpApiVersion
ImagehlpApiVersion.restype = ctypes.c_void_p
ImagehlpApiVersion.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	dbghelp = windows.NewLazySystemDLL("dbghelp.dll")
	procImagehlpApiVersion = dbghelp.NewProc("ImagehlpApiVersion")
)

r1, _, err := procImagehlpApiVersion.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // API_VERSION*
function ImagehlpApiVersion: Pointer; stdcall;
  external 'dbghelp.dll' name 'ImagehlpApiVersion';
result := DllCall("dbghelp\ImagehlpApiVersion", "Ptr")
●ImagehlpApiVersion() = DLL("dbghelp.dll", "void* ImagehlpApiVersion()")
# 呼び出し: ImagehlpApiVersion()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。