ホーム › System.Diagnostics.Debug › GetTimestampForLoadedLibrary
GetTimestampForLoadedLibrary
関数読み込み済みモジュールのタイムスタンプを取得する。
シグネチャ
// dbghelp.dll
#include <windows.h>
DWORD GetTimestampForLoadedLibrary(
HMODULE Module
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Module | HMODULE | in |
戻り値の型: DWORD
各言語での呼び出し定義
// dbghelp.dll
#include <windows.h>
DWORD GetTimestampForLoadedLibrary(
HMODULE Module
);[DllImport("dbghelp.dll", SetLastError = true, ExactSpelling = true)]
static extern uint GetTimestampForLoadedLibrary(
IntPtr Module // HMODULE
);<DllImport("dbghelp.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function GetTimestampForLoadedLibrary(
[Module] As IntPtr ' HMODULE
) As UInteger
End Function' Module : HMODULE
Declare PtrSafe Function GetTimestampForLoadedLibrary Lib "dbghelp" ( _
ByVal Module As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GetTimestampForLoadedLibrary = ctypes.windll.dbghelp.GetTimestampForLoadedLibrary
GetTimestampForLoadedLibrary.restype = wintypes.DWORD
GetTimestampForLoadedLibrary.argtypes = [
wintypes.HANDLE, # Module : HMODULE
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('dbghelp.dll')
GetTimestampForLoadedLibrary = Fiddle::Function.new(
lib['GetTimestampForLoadedLibrary'],
[
Fiddle::TYPE_VOIDP, # Module : HMODULE
],
-Fiddle::TYPE_INT)#[link(name = "dbghelp")]
extern "system" {
fn GetTimestampForLoadedLibrary(
Module: *mut core::ffi::c_void // HMODULE
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("dbghelp.dll", SetLastError = true)]
public static extern uint GetTimestampForLoadedLibrary(IntPtr Module);
"@
$api = Add-Type -MemberDefinition $sig -Name 'dbghelp_GetTimestampForLoadedLibrary' -Namespace Win32 -PassThru
# $api::GetTimestampForLoadedLibrary(Module)#uselib "dbghelp.dll"
#func global GetTimestampForLoadedLibrary "GetTimestampForLoadedLibrary" sptr
; GetTimestampForLoadedLibrary Module ; 戻り値は stat
; Module : HMODULE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "dbghelp.dll"
#cfunc global GetTimestampForLoadedLibrary "GetTimestampForLoadedLibrary" sptr
; res = GetTimestampForLoadedLibrary(Module)
; Module : HMODULE -> "sptr"; DWORD GetTimestampForLoadedLibrary(HMODULE Module)
#uselib "dbghelp.dll"
#cfunc global GetTimestampForLoadedLibrary "GetTimestampForLoadedLibrary" intptr
; res = GetTimestampForLoadedLibrary(Module)
; Module : HMODULE -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
dbghelp = windows.NewLazySystemDLL("dbghelp.dll")
procGetTimestampForLoadedLibrary = dbghelp.NewProc("GetTimestampForLoadedLibrary")
)
// Module (HMODULE)
r1, _, err := procGetTimestampForLoadedLibrary.Call(
uintptr(Module),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction GetTimestampForLoadedLibrary(
Module: THandle // HMODULE
): DWORD; stdcall;
external 'dbghelp.dll' name 'GetTimestampForLoadedLibrary';result := DllCall("dbghelp\GetTimestampForLoadedLibrary"
, "Ptr", Module ; HMODULE
, "UInt") ; return: DWORD●GetTimestampForLoadedLibrary(Module) = DLL("dbghelp.dll", "dword GetTimestampForLoadedLibrary(void*)")
# 呼び出し: GetTimestampForLoadedLibrary(Module)
# Module : HMODULE -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。