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

STREAM_INFORMATION_ENTRY

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

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

フィールド

フィールドサイズx64x86説明
VersionDWORD4+0+0このエントリ構造体のバージョン番号。
FlagsDWORD4+4+4ストリーム情報の種別を示すフラグ。
StreamInformation_StreamInformation8/4+8+8種別に応じたストリーム情報(タイムスタンプ等)を共用する無名共用体。

共用体: _StreamInformation x64 8B / x86 4B

フィールドサイズx64x86
DesiredStorageClass_DesiredStorageClass8/4+0+0
DataStream_DataStream8/4+0+0
Reparse_Reparse8/4+0+0
Ea_Ea8/4+0+0

各言語での定義

#include <windows.h>

// STREAM_INFORMATION_ENTRY  (x64 16 / x86 12 バイト)
typedef struct STREAM_INFORMATION_ENTRY {
    DWORD Version;
    DWORD Flags;
    _StreamInformation StreamInformation;
} STREAM_INFORMATION_ENTRY;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct STREAM_INFORMATION_ENTRY
{
    public uint Version;
    public uint Flags;
    public _StreamInformation StreamInformation;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure STREAM_INFORMATION_ENTRY
    Public Version As UInteger
    Public Flags As UInteger
    Public StreamInformation As _StreamInformation
End Structure
import ctypes
from ctypes import wintypes

class STREAM_INFORMATION_ENTRY(ctypes.Structure):
    _fields_ = [
        ("Version", wintypes.DWORD),
        ("Flags", wintypes.DWORD),
        ("StreamInformation", _StreamInformation),
    ]
#[repr(C)]
pub struct STREAM_INFORMATION_ENTRY {
    pub Version: u32,
    pub Flags: u32,
    pub StreamInformation: _StreamInformation,
}
import "golang.org/x/sys/windows"

type STREAM_INFORMATION_ENTRY struct {
	Version uint32
	Flags uint32
	StreamInformation _StreamInformation
}
type
  STREAM_INFORMATION_ENTRY = record
    Version: DWORD;
    Flags: DWORD;
    StreamInformation: _StreamInformation;
  end;
const STREAM_INFORMATION_ENTRY = extern struct {
    Version: u32,
    Flags: u32,
    StreamInformation: _StreamInformation,
};
type
  STREAM_INFORMATION_ENTRY {.bycopy.} = object
    Version: uint32
    Flags: uint32
    StreamInformation: _StreamInformation
struct STREAM_INFORMATION_ENTRY
{
    uint Version;
    uint Flags;
    _StreamInformation StreamInformation;
}

HSP用 定義

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

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

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