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

FS_BPIO_OUTPUT

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

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

フィールド

フィールドサイズx64x86説明
OperationFS_BPIO_OPERATIONS4+0+0実行されたBypassIO操作の種別を示す列挙値。
OutFlagsFS_BPIO_OUTFLAGS4+4+4BypassIO操作の結果を示す出力フラグ。
Reserved1ULONGLONG8+8+8将来の拡張用に予約された領域。
Reserved2ULONGLONG8+16+16将来の拡張用に予約された領域。
Anonymous_Anonymous_e__Union328+24+24操作種別に応じた結果データを格納する無名共用体(結果/情報等)。

共用体: _Anonymous_e__Union x64 328B / x86 328B

フィールドサイズx64x86
EnableFS_BPIO_RESULTS328+0+0
QueryFS_BPIO_RESULTS328+0+0
VolumeStackResumeFS_BPIO_RESULTS328+0+0
StreamResumeFS_BPIO_RESULTS328+0+0
GetInfoFS_BPIO_INFO72+0+0

各言語での定義

#include <windows.h>

// FS_BPIO_OUTPUT  (x64 352 / x86 352 バイト)
typedef struct FS_BPIO_OUTPUT {
    FS_BPIO_OPERATIONS Operation;
    FS_BPIO_OUTFLAGS OutFlags;
    ULONGLONG Reserved1;
    ULONGLONG Reserved2;
    _Anonymous_e__Union Anonymous;
} FS_BPIO_OUTPUT;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FS_BPIO_OUTPUT
{
    public int Operation;
    public int OutFlags;
    public ulong Reserved1;
    public ulong Reserved2;
    public _Anonymous_e__Union Anonymous;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FS_BPIO_OUTPUT
    Public Operation As Integer
    Public OutFlags As Integer
    Public Reserved1 As ULong
    Public Reserved2 As ULong
    Public Anonymous As _Anonymous_e__Union
End Structure
import ctypes
from ctypes import wintypes

class FS_BPIO_OUTPUT(ctypes.Structure):
    _fields_ = [
        ("Operation", ctypes.c_int),
        ("OutFlags", ctypes.c_int),
        ("Reserved1", ctypes.c_ulonglong),
        ("Reserved2", ctypes.c_ulonglong),
        ("Anonymous", _Anonymous_e__Union),
    ]
#[repr(C)]
pub struct FS_BPIO_OUTPUT {
    pub Operation: i32,
    pub OutFlags: i32,
    pub Reserved1: u64,
    pub Reserved2: u64,
    pub Anonymous: _Anonymous_e__Union,
}
import "golang.org/x/sys/windows"

type FS_BPIO_OUTPUT struct {
	Operation int32
	OutFlags int32
	Reserved1 uint64
	Reserved2 uint64
	Anonymous _Anonymous_e__Union
}
type
  FS_BPIO_OUTPUT = record
    Operation: Integer;
    OutFlags: Integer;
    Reserved1: UInt64;
    Reserved2: UInt64;
    Anonymous: _Anonymous_e__Union;
  end;
const FS_BPIO_OUTPUT = extern struct {
    Operation: i32,
    OutFlags: i32,
    Reserved1: u64,
    Reserved2: u64,
    Anonymous: _Anonymous_e__Union,
};
type
  FS_BPIO_OUTPUT {.bycopy.} = object
    Operation: int32
    OutFlags: int32
    Reserved1: uint64
    Reserved2: uint64
    Anonymous: _Anonymous_e__Union
struct FS_BPIO_OUTPUT
{
    int Operation;
    int OutFlags;
    ulong Reserved1;
    ulong Reserved2;
    _Anonymous_e__Union Anonymous;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; FS_BPIO_OUTPUT サイズ: 352 バイト(x64)
dim st, 88    ; 4byte整数×88(構造体サイズ 352 / 4 切り上げ)
; Operation : FS_BPIO_OPERATIONS (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; OutFlags : FS_BPIO_OUTFLAGS (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; Reserved1 : ULONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; Reserved2 : ULONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; Anonymous : _Anonymous_e__Union (+24, 328byte)  varptr(st)+24 を基点に操作(328byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global FS_BPIO_OUTPUT
    #field int Operation
    #field int OutFlags
    #field int64 Reserved1
    #field int64 Reserved2
    #field byte Anonymous 328
#endstruct

stdim st, FS_BPIO_OUTPUT        ; NSTRUCT 変数を確保
st->Operation = 100
mes "Operation=" + st->Operation
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。