-
打开 PowerShell。
-
输入以下脚本并执行:
$path = "D:\vlc_bak\libvlc.dll"
$peHeaderOffset = 0x3C
$machineTypeOffset = 0x4
$stream = [System.IO.File]::OpenRead($path)
$stream.Seek($peHeaderOffset, [System.IO.SeekOrigin]::Begin) | Out-Null
$binaryReader = New-Object System.IO.BinaryReader($stream)
$stream.Seek($binaryReader.ReadInt32(), [System.IO.SeekOrigin]::Begin) | Out-Null
$stream.Seek($machineTypeOffset, [System.IO.SeekOrigin]::Current) | Out-Null
$machineType = $binaryReader.ReadUInt16()
$stream.Close()
switch ($machineType) {
0x014c { "32-bit" }
0x8664 { "64-bit" }
default { "Unknown" }
}
输出结果: