Win32 API 日本語リファレンス
ホームSystem.Ioctl › WIM_PROVIDER_ADD_OVERLAY_INPUT

WIM_PROVIDER_ADD_OVERLAY_INPUT

構造体
サイズx64: 16 バイト / x86: 16 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
WimTypeDWORD4+0+0追加するWIMの種別を示す値。
WimIndexDWORD4+4+4WIM内のイメージインデックス番号。
WimFileNameOffsetDWORD4+8+8WIMファイル名へのオフセット(バイト)。
WimFileNameLengthDWORD4+12+12WIMファイル名の長さ(バイト)。

各言語での定義

#include <windows.h>

// WIM_PROVIDER_ADD_OVERLAY_INPUT  (x64 16 / x86 16 バイト)
typedef struct WIM_PROVIDER_ADD_OVERLAY_INPUT {
    DWORD WimType;
    DWORD WimIndex;
    DWORD WimFileNameOffset;
    DWORD WimFileNameLength;
} WIM_PROVIDER_ADD_OVERLAY_INPUT;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WIM_PROVIDER_ADD_OVERLAY_INPUT
{
    public uint WimType;
    public uint WimIndex;
    public uint WimFileNameOffset;
    public uint WimFileNameLength;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WIM_PROVIDER_ADD_OVERLAY_INPUT
    Public WimType As UInteger
    Public WimIndex As UInteger
    Public WimFileNameOffset As UInteger
    Public WimFileNameLength As UInteger
End Structure
import ctypes
from ctypes import wintypes

class WIM_PROVIDER_ADD_OVERLAY_INPUT(ctypes.Structure):
    _fields_ = [
        ("WimType", wintypes.DWORD),
        ("WimIndex", wintypes.DWORD),
        ("WimFileNameOffset", wintypes.DWORD),
        ("WimFileNameLength", wintypes.DWORD),
    ]
#[repr(C)]
pub struct WIM_PROVIDER_ADD_OVERLAY_INPUT {
    pub WimType: u32,
    pub WimIndex: u32,
    pub WimFileNameOffset: u32,
    pub WimFileNameLength: u32,
}
import "golang.org/x/sys/windows"

type WIM_PROVIDER_ADD_OVERLAY_INPUT struct {
	WimType uint32
	WimIndex uint32
	WimFileNameOffset uint32
	WimFileNameLength uint32
}
type
  WIM_PROVIDER_ADD_OVERLAY_INPUT = record
    WimType: DWORD;
    WimIndex: DWORD;
    WimFileNameOffset: DWORD;
    WimFileNameLength: DWORD;
  end;
const WIM_PROVIDER_ADD_OVERLAY_INPUT = extern struct {
    WimType: u32,
    WimIndex: u32,
    WimFileNameOffset: u32,
    WimFileNameLength: u32,
};
type
  WIM_PROVIDER_ADD_OVERLAY_INPUT {.bycopy.} = object
    WimType: uint32
    WimIndex: uint32
    WimFileNameOffset: uint32
    WimFileNameLength: uint32
struct WIM_PROVIDER_ADD_OVERLAY_INPUT
{
    uint WimType;
    uint WimIndex;
    uint WimFileNameOffset;
    uint WimFileNameLength;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WIM_PROVIDER_ADD_OVERLAY_INPUT サイズ: 16 バイト(x64)
dim st, 4    ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; WimType : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; WimIndex : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; WimFileNameOffset : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; WimFileNameLength : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WIM_PROVIDER_ADD_OVERLAY_INPUT
    #field int WimType
    #field int WimIndex
    #field int WimFileNameOffset
    #field int WimFileNameLength
#endstruct

stdim st, WIM_PROVIDER_ADD_OVERLAY_INPUT        ; NSTRUCT 変数を確保
st->WimType = 100
mes "WimType=" + st->WimType