ホーム › Storage.FileSystem › WIM_ENTRY_INFO
WIM_ENTRY_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| WimEntryInfoSize | DWORD | 4 | +0 | +0 | 本構造体のサイズ。バイト単位。 |
| WimType | DWORD | 4 | +4 | +4 | WIMの種類を示す値。 |
| DataSourceId | LONGLONG | 8 | +8 | +8 | WIMデータソースを識別する64ビットID。 |
| WimGuid | GUID | 16 | +16 | +16 | WIMファイルを一意に識別するGUID。 |
| WimPath | LPWSTR | 8/4 | +32 | +32 | WIMファイルのパス文字列。Unicode。 |
| WimIndex | DWORD | 4 | +40 | +36 | WIM内のイメージインデックス番号。 |
| Flags | DWORD | 4 | +44 | +40 | エントリの状態を示すフラグ。 |
各言語での定義
#include <windows.h>
// WIM_ENTRY_INFO (x64 48 / x86 48 バイト)
typedef struct WIM_ENTRY_INFO {
DWORD WimEntryInfoSize;
DWORD WimType;
LONGLONG DataSourceId;
GUID WimGuid;
LPWSTR WimPath;
DWORD WimIndex;
DWORD Flags;
} WIM_ENTRY_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WIM_ENTRY_INFO
{
public uint WimEntryInfoSize;
public uint WimType;
public long DataSourceId;
public Guid WimGuid;
public IntPtr WimPath;
public uint WimIndex;
public uint Flags;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WIM_ENTRY_INFO
Public WimEntryInfoSize As UInteger
Public WimType As UInteger
Public DataSourceId As Long
Public WimGuid As Guid
Public WimPath As IntPtr
Public WimIndex As UInteger
Public Flags As UInteger
End Structureimport ctypes
from ctypes import wintypes
class WIM_ENTRY_INFO(ctypes.Structure):
_fields_ = [
("WimEntryInfoSize", wintypes.DWORD),
("WimType", wintypes.DWORD),
("DataSourceId", ctypes.c_longlong),
("WimGuid", GUID),
("WimPath", ctypes.c_void_p),
("WimIndex", wintypes.DWORD),
("Flags", wintypes.DWORD),
]#[repr(C)]
pub struct WIM_ENTRY_INFO {
pub WimEntryInfoSize: u32,
pub WimType: u32,
pub DataSourceId: i64,
pub WimGuid: GUID,
pub WimPath: *mut core::ffi::c_void,
pub WimIndex: u32,
pub Flags: u32,
}import "golang.org/x/sys/windows"
type WIM_ENTRY_INFO struct {
WimEntryInfoSize uint32
WimType uint32
DataSourceId int64
WimGuid windows.GUID
WimPath uintptr
WimIndex uint32
Flags uint32
}type
WIM_ENTRY_INFO = record
WimEntryInfoSize: DWORD;
WimType: DWORD;
DataSourceId: Int64;
WimGuid: TGUID;
WimPath: Pointer;
WimIndex: DWORD;
Flags: DWORD;
end;const WIM_ENTRY_INFO = extern struct {
WimEntryInfoSize: u32,
WimType: u32,
DataSourceId: i64,
WimGuid: GUID,
WimPath: ?*anyopaque,
WimIndex: u32,
Flags: u32,
};type
WIM_ENTRY_INFO {.bycopy.} = object
WimEntryInfoSize: uint32
WimType: uint32
DataSourceId: int64
WimGuid: GUID
WimPath: pointer
WimIndex: uint32
Flags: uint32struct WIM_ENTRY_INFO
{
uint WimEntryInfoSize;
uint WimType;
long DataSourceId;
GUID WimGuid;
void* WimPath;
uint WimIndex;
uint Flags;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WIM_ENTRY_INFO サイズ: 48 バイト(x86)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; WimEntryInfoSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; WimType : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; DataSourceId : LONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; WimGuid : GUID (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; WimPath : LPWSTR (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; WimIndex : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; Flags : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WIM_ENTRY_INFO サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; WimEntryInfoSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; WimType : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; DataSourceId : LONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; WimGuid : GUID (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; WimPath : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; WimIndex : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; Flags : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global WIM_ENTRY_INFO
#field int WimEntryInfoSize
#field int WimType
#field int64 DataSourceId
#field GUID WimGuid
#field intptr WimPath
#field int WimIndex
#field int Flags
#endstruct
stdim st, WIM_ENTRY_INFO ; NSTRUCT 変数を確保
st->WimEntryInfoSize = 100
mes "WimEntryInfoSize=" + st->WimEntryInfoSize