ホーム › System.Diagnostics.Debug › ImagehlpApiVersionEx
ImagehlpApiVersionEx
関数指定バージョンを基にImageHlp APIのバージョン情報を取得する。
シグネチャ
// dbghelp.dll
#include <windows.h>
API_VERSION* ImagehlpApiVersionEx(
API_VERSION* AppVersion
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| AppVersion | API_VERSION* | in |
戻り値の型: API_VERSION*
各言語での呼び出し定義
// dbghelp.dll
#include <windows.h>
API_VERSION* ImagehlpApiVersionEx(
API_VERSION* AppVersion
);[DllImport("dbghelp.dll", ExactSpelling = true)]
static extern IntPtr ImagehlpApiVersionEx(
IntPtr AppVersion // API_VERSION*
);<DllImport("dbghelp.dll", ExactSpelling:=True)>
Public Shared Function ImagehlpApiVersionEx(
AppVersion As IntPtr ' API_VERSION*
) As IntPtr
End Function' AppVersion : API_VERSION*
Declare PtrSafe Function ImagehlpApiVersionEx Lib "dbghelp" ( _
ByVal AppVersion As LongPtr) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ImagehlpApiVersionEx = ctypes.windll.dbghelp.ImagehlpApiVersionEx
ImagehlpApiVersionEx.restype = ctypes.c_void_p
ImagehlpApiVersionEx.argtypes = [
ctypes.c_void_p, # AppVersion : API_VERSION*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('dbghelp.dll')
ImagehlpApiVersionEx = Fiddle::Function.new(
lib['ImagehlpApiVersionEx'],
[
Fiddle::TYPE_VOIDP, # AppVersion : API_VERSION*
],
Fiddle::TYPE_VOIDP)#[link(name = "dbghelp")]
extern "system" {
fn ImagehlpApiVersionEx(
AppVersion: *mut API_VERSION // API_VERSION*
) -> *mut API_VERSION;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("dbghelp.dll")]
public static extern IntPtr ImagehlpApiVersionEx(IntPtr AppVersion);
"@
$api = Add-Type -MemberDefinition $sig -Name 'dbghelp_ImagehlpApiVersionEx' -Namespace Win32 -PassThru
# $api::ImagehlpApiVersionEx(AppVersion)#uselib "dbghelp.dll"
#func global ImagehlpApiVersionEx "ImagehlpApiVersionEx" sptr
; ImagehlpApiVersionEx varptr(AppVersion) ; 戻り値は stat
; AppVersion : API_VERSION* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "dbghelp.dll" #cfunc global ImagehlpApiVersionEx "ImagehlpApiVersionEx" var ; res = ImagehlpApiVersionEx(AppVersion) ; AppVersion : API_VERSION* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "dbghelp.dll" #cfunc global ImagehlpApiVersionEx "ImagehlpApiVersionEx" sptr ; res = ImagehlpApiVersionEx(varptr(AppVersion)) ; AppVersion : API_VERSION* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; API_VERSION* ImagehlpApiVersionEx(API_VERSION* AppVersion) #uselib "dbghelp.dll" #cfunc global ImagehlpApiVersionEx "ImagehlpApiVersionEx" var ; res = ImagehlpApiVersionEx(AppVersion) ; AppVersion : API_VERSION* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; API_VERSION* ImagehlpApiVersionEx(API_VERSION* AppVersion) #uselib "dbghelp.dll" #cfunc global ImagehlpApiVersionEx "ImagehlpApiVersionEx" intptr ; res = ImagehlpApiVersionEx(varptr(AppVersion)) ; AppVersion : API_VERSION* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
dbghelp = windows.NewLazySystemDLL("dbghelp.dll")
procImagehlpApiVersionEx = dbghelp.NewProc("ImagehlpApiVersionEx")
)
// AppVersion (API_VERSION*)
r1, _, err := procImagehlpApiVersionEx.Call(
uintptr(AppVersion),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // API_VERSION*function ImagehlpApiVersionEx(
AppVersion: Pointer // API_VERSION*
): Pointer; stdcall;
external 'dbghelp.dll' name 'ImagehlpApiVersionEx';result := DllCall("dbghelp\ImagehlpApiVersionEx"
, "Ptr", AppVersion ; API_VERSION*
, "Ptr") ; return: API_VERSION*●ImagehlpApiVersionEx(AppVersion) = DLL("dbghelp.dll", "void* ImagehlpApiVersionEx(void*)")
# 呼び出し: ImagehlpApiVersionEx(AppVersion)
# AppVersion : API_VERSION* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。