ホーム › Storage.FileSystem › VS_FIXEDFILEINFO
VS_FIXEDFILEINFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSignature | DWORD | 4 | +0 | +0 | 構造体の識別シグネチャ。常に0xFEEF04BD。 |
| dwStrucVersion | DWORD | 4 | +4 | +4 | 本構造体のバージョン。上位16ビットがメジャー、下位がマイナー。 |
| dwFileVersionMS | DWORD | 4 | +8 | +8 | ファイルバージョンの上位32ビット。 |
| dwFileVersionLS | DWORD | 4 | +12 | +12 | ファイルバージョンの下位32ビット。 |
| dwProductVersionMS | DWORD | 4 | +16 | +16 | 製品バージョンの上位32ビット。 |
| dwProductVersionLS | DWORD | 4 | +20 | +20 | 製品バージョンの下位32ビット。 |
| dwFileFlagsMask | DWORD | 4 | +24 | +24 | dwFileFlagsのうち有効なビットを示すマスク。 |
| dwFileFlags | VS_FIXEDFILEINFO_FILE_FLAGS | 4 | +28 | +28 | ファイルの状態を示すフラグ。デバッグ版/プレリリース等。 |
| dwFileOS | VS_FIXEDFILEINFO_FILE_OS | 4 | +32 | +32 | 対象とするオペレーティングシステムを示す値。 |
| dwFileType | DWORD | 4 | +36 | +36 | ファイルの種類を示す値。アプリ/DLL/ドライバ等。 |
| dwFileSubtype | DWORD | 4 | +40 | +40 | ファイルの副種別。ドライバ/フォントの種類を示す。 |
| dwFileDateMS | DWORD | 4 | +44 | +44 | ファイル作成日時の上位32ビット。通常0。 |
| dwFileDateLS | DWORD | 4 | +48 | +48 | ファイル作成日時の下位32ビット。通常0。 |
各言語での定義
#include <windows.h>
// VS_FIXEDFILEINFO (x64 52 / x86 52 バイト)
typedef struct VS_FIXEDFILEINFO {
DWORD dwSignature;
DWORD dwStrucVersion;
DWORD dwFileVersionMS;
DWORD dwFileVersionLS;
DWORD dwProductVersionMS;
DWORD dwProductVersionLS;
DWORD dwFileFlagsMask;
VS_FIXEDFILEINFO_FILE_FLAGS dwFileFlags;
VS_FIXEDFILEINFO_FILE_OS dwFileOS;
DWORD dwFileType;
DWORD dwFileSubtype;
DWORD dwFileDateMS;
DWORD dwFileDateLS;
} VS_FIXEDFILEINFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VS_FIXEDFILEINFO
{
public uint dwSignature;
public uint dwStrucVersion;
public uint dwFileVersionMS;
public uint dwFileVersionLS;
public uint dwProductVersionMS;
public uint dwProductVersionLS;
public uint dwFileFlagsMask;
public uint dwFileFlags;
public uint dwFileOS;
public uint dwFileType;
public uint dwFileSubtype;
public uint dwFileDateMS;
public uint dwFileDateLS;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VS_FIXEDFILEINFO
Public dwSignature As UInteger
Public dwStrucVersion As UInteger
Public dwFileVersionMS As UInteger
Public dwFileVersionLS As UInteger
Public dwProductVersionMS As UInteger
Public dwProductVersionLS As UInteger
Public dwFileFlagsMask As UInteger
Public dwFileFlags As UInteger
Public dwFileOS As UInteger
Public dwFileType As UInteger
Public dwFileSubtype As UInteger
Public dwFileDateMS As UInteger
Public dwFileDateLS As UInteger
End Structureimport ctypes
from ctypes import wintypes
class VS_FIXEDFILEINFO(ctypes.Structure):
_fields_ = [
("dwSignature", wintypes.DWORD),
("dwStrucVersion", wintypes.DWORD),
("dwFileVersionMS", wintypes.DWORD),
("dwFileVersionLS", wintypes.DWORD),
("dwProductVersionMS", wintypes.DWORD),
("dwProductVersionLS", wintypes.DWORD),
("dwFileFlagsMask", wintypes.DWORD),
("dwFileFlags", wintypes.DWORD),
("dwFileOS", wintypes.DWORD),
("dwFileType", wintypes.DWORD),
("dwFileSubtype", wintypes.DWORD),
("dwFileDateMS", wintypes.DWORD),
("dwFileDateLS", wintypes.DWORD),
]#[repr(C)]
pub struct VS_FIXEDFILEINFO {
pub dwSignature: u32,
pub dwStrucVersion: u32,
pub dwFileVersionMS: u32,
pub dwFileVersionLS: u32,
pub dwProductVersionMS: u32,
pub dwProductVersionLS: u32,
pub dwFileFlagsMask: u32,
pub dwFileFlags: u32,
pub dwFileOS: u32,
pub dwFileType: u32,
pub dwFileSubtype: u32,
pub dwFileDateMS: u32,
pub dwFileDateLS: u32,
}import "golang.org/x/sys/windows"
type VS_FIXEDFILEINFO struct {
dwSignature uint32
dwStrucVersion uint32
dwFileVersionMS uint32
dwFileVersionLS uint32
dwProductVersionMS uint32
dwProductVersionLS uint32
dwFileFlagsMask uint32
dwFileFlags uint32
dwFileOS uint32
dwFileType uint32
dwFileSubtype uint32
dwFileDateMS uint32
dwFileDateLS uint32
}type
VS_FIXEDFILEINFO = record
dwSignature: DWORD;
dwStrucVersion: DWORD;
dwFileVersionMS: DWORD;
dwFileVersionLS: DWORD;
dwProductVersionMS: DWORD;
dwProductVersionLS: DWORD;
dwFileFlagsMask: DWORD;
dwFileFlags: DWORD;
dwFileOS: DWORD;
dwFileType: DWORD;
dwFileSubtype: DWORD;
dwFileDateMS: DWORD;
dwFileDateLS: DWORD;
end;const VS_FIXEDFILEINFO = extern struct {
dwSignature: u32,
dwStrucVersion: u32,
dwFileVersionMS: u32,
dwFileVersionLS: u32,
dwProductVersionMS: u32,
dwProductVersionLS: u32,
dwFileFlagsMask: u32,
dwFileFlags: u32,
dwFileOS: u32,
dwFileType: u32,
dwFileSubtype: u32,
dwFileDateMS: u32,
dwFileDateLS: u32,
};type
VS_FIXEDFILEINFO {.bycopy.} = object
dwSignature: uint32
dwStrucVersion: uint32
dwFileVersionMS: uint32
dwFileVersionLS: uint32
dwProductVersionMS: uint32
dwProductVersionLS: uint32
dwFileFlagsMask: uint32
dwFileFlags: uint32
dwFileOS: uint32
dwFileType: uint32
dwFileSubtype: uint32
dwFileDateMS: uint32
dwFileDateLS: uint32struct VS_FIXEDFILEINFO
{
uint dwSignature;
uint dwStrucVersion;
uint dwFileVersionMS;
uint dwFileVersionLS;
uint dwProductVersionMS;
uint dwProductVersionLS;
uint dwFileFlagsMask;
uint dwFileFlags;
uint dwFileOS;
uint dwFileType;
uint dwFileSubtype;
uint dwFileDateMS;
uint dwFileDateLS;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VS_FIXEDFILEINFO サイズ: 52 バイト(x64)
dim st, 13 ; 4byte整数×13(構造体サイズ 52 / 4 切り上げ)
; dwSignature : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwStrucVersion : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwFileVersionMS : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwFileVersionLS : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwProductVersionMS : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwProductVersionLS : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwFileFlagsMask : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwFileFlags : VS_FIXEDFILEINFO_FILE_FLAGS (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwFileOS : VS_FIXEDFILEINFO_FILE_OS (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; dwFileType : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; dwFileSubtype : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; dwFileDateMS : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; dwFileDateLS : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global VS_FIXEDFILEINFO
#field int dwSignature
#field int dwStrucVersion
#field int dwFileVersionMS
#field int dwFileVersionLS
#field int dwProductVersionMS
#field int dwProductVersionLS
#field int dwFileFlagsMask
#field int dwFileFlags
#field int dwFileOS
#field int dwFileType
#field int dwFileSubtype
#field int dwFileDateMS
#field int dwFileDateLS
#endstruct
stdim st, VS_FIXEDFILEINFO ; NSTRUCT 変数を確保
st->dwSignature = 100
mes "dwSignature=" + st->dwSignature