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

NTFS_STATISTICS

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

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

フィールド

フィールドサイズx64x86説明
LogFileFullExceptionsDWORD4+0+0ログファイルが満杯になり発生した例外の回数。
OtherExceptionsDWORD4+4+4上記以外で発生した例外の回数。
MftReadsDWORD4+8+8MFT(マスタファイルテーブル)の読み取り回数。
MftReadBytesDWORD4+12+12MFT読み取りで処理されたバイト数。
MftWritesDWORD4+16+16MFTの書き込み回数。
MftWriteBytesDWORD4+20+20MFT書き込みで処理されたバイト数。
MftWritesUserLevel_MftWritesUserLevel_e__Struct8+24+24MFT書き込みの発生元レベル別内訳を保持する内部構造体。
MftWritesFlushForLogFileFullWORD2+32+32ログファイル満杯のフラッシュに起因するMFT書き込み回数。
MftWritesLazyWriterWORD2+34+34遅延書き込み(レイジーライタ)によるMFT書き込み回数。
MftWritesUserRequestWORD2+36+36ユーザー要求に起因するMFT書き込み回数。
Mft2WritesDWORD4+40+40MFTミラー(MFT2)の書き込み回数。
Mft2WriteBytesDWORD4+44+44MFTミラー書き込みで処理されたバイト数。
Mft2WritesUserLevel_Mft2WritesUserLevel_e__Struct8+48+48MFTミラー書き込みの発生元レベル別内訳を保持する内部構造体。
Mft2WritesFlushForLogFileFullWORD2+56+56ログファイル満杯のフラッシュに起因するMFTミラー書き込み回数。
Mft2WritesLazyWriterWORD2+58+58遅延書き込みによるMFTミラー書き込み回数。
Mft2WritesUserRequestWORD2+60+60ユーザー要求に起因するMFTミラー書き込み回数。
RootIndexReadsDWORD4+64+64ルートインデックスの読み取り回数。
RootIndexReadBytesDWORD4+68+68ルートインデックス読み取りで処理されたバイト数。
RootIndexWritesDWORD4+72+72ルートインデックスの書き込み回数。
RootIndexWriteBytesDWORD4+76+76ルートインデックス書き込みで処理されたバイト数。
BitmapReadsDWORD4+80+80ボリュームビットマップの読み取り回数。
BitmapReadBytesDWORD4+84+84ビットマップ読み取りで処理されたバイト数。
BitmapWritesDWORD4+88+88ボリュームビットマップの書き込み回数。
BitmapWriteBytesDWORD4+92+92ビットマップ書き込みで処理されたバイト数。
BitmapWritesFlushForLogFileFullWORD2+96+96ログファイル満杯のフラッシュに起因するビットマップ書き込み回数。
BitmapWritesLazyWriterWORD2+98+98遅延書き込みによるビットマップ書き込み回数。
BitmapWritesUserRequestWORD2+100+100ユーザー要求に起因するビットマップ書き込み回数。
BitmapWritesUserLevel_BitmapWritesUserLevel_e__Struct6+102+102ビットマップ書き込みの発生元レベル別内訳を保持する内部構造体。
MftBitmapReadsDWORD4+108+108MFTビットマップの読み取り回数。
MftBitmapReadBytesDWORD4+112+112MFTビットマップ読み取りで処理されたバイト数。
MftBitmapWritesDWORD4+116+116MFTビットマップの書き込み回数。
MftBitmapWriteBytesDWORD4+120+120MFTビットマップ書き込みで処理されたバイト数。
MftBitmapWritesFlushForLogFileFullWORD2+124+124ログファイル満杯のフラッシュに起因するMFTビットマップ書き込み回数。
MftBitmapWritesLazyWriterWORD2+126+126遅延書き込みによるMFTビットマップ書き込み回数。
MftBitmapWritesUserRequestWORD2+128+128ユーザー要求に起因するMFTビットマップ書き込み回数。
MftBitmapWritesUserLevel_MftBitmapWritesUserLevel_e__Struct8+130+130MFTビットマップ書き込みの発生元レベル別内訳を保持する内部構造体。
UserIndexReadsDWORD4+140+140ユーザーインデックスの読み取り回数。
UserIndexReadBytesDWORD4+144+144ユーザーインデックス読み取りで処理されたバイト数。
UserIndexWritesDWORD4+148+148ユーザーインデックスの書き込み回数。
UserIndexWriteBytesDWORD4+152+152ユーザーインデックス書き込みで処理されたバイト数。
LogFileReadsDWORD4+156+156ログファイルの読み取り回数。
LogFileReadBytesDWORD4+160+160ログファイル読み取りで処理されたバイト数。
LogFileWritesDWORD4+164+164ログファイルの書き込み回数。
LogFileWriteBytesDWORD4+168+168ログファイル書き込みで処理されたバイト数。
Allocate_Allocate_e__Struct40+172+172クラスタ割り当て活動の統計を保持する内部構造体。
DiskResourcesExhaustedDWORD4+212+212ディスク領域が枯渇した発生回数。

構造体: _MftWritesUserLevel_e__Struct x64 8B / x86 8B

フィールドサイズx64x86
WriteWORD2+0+0
CreateWORD2+2+2
SetInfoWORD2+4+4
FlushWORD2+6+6

構造体: _Mft2WritesUserLevel_e__Struct x64 8B / x86 8B

フィールドサイズx64x86
WriteWORD2+0+0
CreateWORD2+2+2
SetInfoWORD2+4+4
FlushWORD2+6+6

構造体: _BitmapWritesUserLevel_e__Struct x64 6B / x86 6B

フィールドサイズx64x86
WriteWORD2+0+0
CreateWORD2+2+2
SetInfoWORD2+4+4

構造体: _MftBitmapWritesUserLevel_e__Struct x64 8B / x86 8B

フィールドサイズx64x86
WriteWORD2+0+0
CreateWORD2+2+2
SetInfoWORD2+4+4
FlushWORD2+6+6

構造体: _Allocate_e__Struct x64 40B / x86 40B

フィールドサイズx64x86
CallsDWORD4+0+0
ClustersDWORD4+4+4
HintsDWORD4+8+8
RunsReturnedDWORD4+12+12
HintsHonoredDWORD4+16+16
HintsClustersDWORD4+20+20
CacheDWORD4+24+24
CacheClustersDWORD4+28+28
CacheMissDWORD4+32+32
CacheMissClustersDWORD4+36+36

各言語での定義

#include <windows.h>

// NTFS_STATISTICS  (x64 216 / x86 216 バイト)
typedef struct NTFS_STATISTICS {
    DWORD LogFileFullExceptions;
    DWORD OtherExceptions;
    DWORD MftReads;
    DWORD MftReadBytes;
    DWORD MftWrites;
    DWORD MftWriteBytes;
    _MftWritesUserLevel_e__Struct MftWritesUserLevel;
    WORD MftWritesFlushForLogFileFull;
    WORD MftWritesLazyWriter;
    WORD MftWritesUserRequest;
    DWORD Mft2Writes;
    DWORD Mft2WriteBytes;
    _Mft2WritesUserLevel_e__Struct Mft2WritesUserLevel;
    WORD Mft2WritesFlushForLogFileFull;
    WORD Mft2WritesLazyWriter;
    WORD Mft2WritesUserRequest;
    DWORD RootIndexReads;
    DWORD RootIndexReadBytes;
    DWORD RootIndexWrites;
    DWORD RootIndexWriteBytes;
    DWORD BitmapReads;
    DWORD BitmapReadBytes;
    DWORD BitmapWrites;
    DWORD BitmapWriteBytes;
    WORD BitmapWritesFlushForLogFileFull;
    WORD BitmapWritesLazyWriter;
    WORD BitmapWritesUserRequest;
    _BitmapWritesUserLevel_e__Struct BitmapWritesUserLevel;
    DWORD MftBitmapReads;
    DWORD MftBitmapReadBytes;
    DWORD MftBitmapWrites;
    DWORD MftBitmapWriteBytes;
    WORD MftBitmapWritesFlushForLogFileFull;
    WORD MftBitmapWritesLazyWriter;
    WORD MftBitmapWritesUserRequest;
    _MftBitmapWritesUserLevel_e__Struct MftBitmapWritesUserLevel;
    DWORD UserIndexReads;
    DWORD UserIndexReadBytes;
    DWORD UserIndexWrites;
    DWORD UserIndexWriteBytes;
    DWORD LogFileReads;
    DWORD LogFileReadBytes;
    DWORD LogFileWrites;
    DWORD LogFileWriteBytes;
    _Allocate_e__Struct Allocate;
    DWORD DiskResourcesExhausted;
} NTFS_STATISTICS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NTFS_STATISTICS
{
    public uint LogFileFullExceptions;
    public uint OtherExceptions;
    public uint MftReads;
    public uint MftReadBytes;
    public uint MftWrites;
    public uint MftWriteBytes;
    public _MftWritesUserLevel_e__Struct MftWritesUserLevel;
    public ushort MftWritesFlushForLogFileFull;
    public ushort MftWritesLazyWriter;
    public ushort MftWritesUserRequest;
    public uint Mft2Writes;
    public uint Mft2WriteBytes;
    public _Mft2WritesUserLevel_e__Struct Mft2WritesUserLevel;
    public ushort Mft2WritesFlushForLogFileFull;
    public ushort Mft2WritesLazyWriter;
    public ushort Mft2WritesUserRequest;
    public uint RootIndexReads;
    public uint RootIndexReadBytes;
    public uint RootIndexWrites;
    public uint RootIndexWriteBytes;
    public uint BitmapReads;
    public uint BitmapReadBytes;
    public uint BitmapWrites;
    public uint BitmapWriteBytes;
    public ushort BitmapWritesFlushForLogFileFull;
    public ushort BitmapWritesLazyWriter;
    public ushort BitmapWritesUserRequest;
    public _BitmapWritesUserLevel_e__Struct BitmapWritesUserLevel;
    public uint MftBitmapReads;
    public uint MftBitmapReadBytes;
    public uint MftBitmapWrites;
    public uint MftBitmapWriteBytes;
    public ushort MftBitmapWritesFlushForLogFileFull;
    public ushort MftBitmapWritesLazyWriter;
    public ushort MftBitmapWritesUserRequest;
    public _MftBitmapWritesUserLevel_e__Struct MftBitmapWritesUserLevel;
    public uint UserIndexReads;
    public uint UserIndexReadBytes;
    public uint UserIndexWrites;
    public uint UserIndexWriteBytes;
    public uint LogFileReads;
    public uint LogFileReadBytes;
    public uint LogFileWrites;
    public uint LogFileWriteBytes;
    public _Allocate_e__Struct Allocate;
    public uint DiskResourcesExhausted;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NTFS_STATISTICS
    Public LogFileFullExceptions As UInteger
    Public OtherExceptions As UInteger
    Public MftReads As UInteger
    Public MftReadBytes As UInteger
    Public MftWrites As UInteger
    Public MftWriteBytes As UInteger
    Public MftWritesUserLevel As _MftWritesUserLevel_e__Struct
    Public MftWritesFlushForLogFileFull As UShort
    Public MftWritesLazyWriter As UShort
    Public MftWritesUserRequest As UShort
    Public Mft2Writes As UInteger
    Public Mft2WriteBytes As UInteger
    Public Mft2WritesUserLevel As _Mft2WritesUserLevel_e__Struct
    Public Mft2WritesFlushForLogFileFull As UShort
    Public Mft2WritesLazyWriter As UShort
    Public Mft2WritesUserRequest As UShort
    Public RootIndexReads As UInteger
    Public RootIndexReadBytes As UInteger
    Public RootIndexWrites As UInteger
    Public RootIndexWriteBytes As UInteger
    Public BitmapReads As UInteger
    Public BitmapReadBytes As UInteger
    Public BitmapWrites As UInteger
    Public BitmapWriteBytes As UInteger
    Public BitmapWritesFlushForLogFileFull As UShort
    Public BitmapWritesLazyWriter As UShort
    Public BitmapWritesUserRequest As UShort
    Public BitmapWritesUserLevel As _BitmapWritesUserLevel_e__Struct
    Public MftBitmapReads As UInteger
    Public MftBitmapReadBytes As UInteger
    Public MftBitmapWrites As UInteger
    Public MftBitmapWriteBytes As UInteger
    Public MftBitmapWritesFlushForLogFileFull As UShort
    Public MftBitmapWritesLazyWriter As UShort
    Public MftBitmapWritesUserRequest As UShort
    Public MftBitmapWritesUserLevel As _MftBitmapWritesUserLevel_e__Struct
    Public UserIndexReads As UInteger
    Public UserIndexReadBytes As UInteger
    Public UserIndexWrites As UInteger
    Public UserIndexWriteBytes As UInteger
    Public LogFileReads As UInteger
    Public LogFileReadBytes As UInteger
    Public LogFileWrites As UInteger
    Public LogFileWriteBytes As UInteger
    Public Allocate As _Allocate_e__Struct
    Public DiskResourcesExhausted As UInteger
End Structure
import ctypes
from ctypes import wintypes

class NTFS_STATISTICS(ctypes.Structure):
    _fields_ = [
        ("LogFileFullExceptions", wintypes.DWORD),
        ("OtherExceptions", wintypes.DWORD),
        ("MftReads", wintypes.DWORD),
        ("MftReadBytes", wintypes.DWORD),
        ("MftWrites", wintypes.DWORD),
        ("MftWriteBytes", wintypes.DWORD),
        ("MftWritesUserLevel", _MftWritesUserLevel_e__Struct),
        ("MftWritesFlushForLogFileFull", ctypes.c_ushort),
        ("MftWritesLazyWriter", ctypes.c_ushort),
        ("MftWritesUserRequest", ctypes.c_ushort),
        ("Mft2Writes", wintypes.DWORD),
        ("Mft2WriteBytes", wintypes.DWORD),
        ("Mft2WritesUserLevel", _Mft2WritesUserLevel_e__Struct),
        ("Mft2WritesFlushForLogFileFull", ctypes.c_ushort),
        ("Mft2WritesLazyWriter", ctypes.c_ushort),
        ("Mft2WritesUserRequest", ctypes.c_ushort),
        ("RootIndexReads", wintypes.DWORD),
        ("RootIndexReadBytes", wintypes.DWORD),
        ("RootIndexWrites", wintypes.DWORD),
        ("RootIndexWriteBytes", wintypes.DWORD),
        ("BitmapReads", wintypes.DWORD),
        ("BitmapReadBytes", wintypes.DWORD),
        ("BitmapWrites", wintypes.DWORD),
        ("BitmapWriteBytes", wintypes.DWORD),
        ("BitmapWritesFlushForLogFileFull", ctypes.c_ushort),
        ("BitmapWritesLazyWriter", ctypes.c_ushort),
        ("BitmapWritesUserRequest", ctypes.c_ushort),
        ("BitmapWritesUserLevel", _BitmapWritesUserLevel_e__Struct),
        ("MftBitmapReads", wintypes.DWORD),
        ("MftBitmapReadBytes", wintypes.DWORD),
        ("MftBitmapWrites", wintypes.DWORD),
        ("MftBitmapWriteBytes", wintypes.DWORD),
        ("MftBitmapWritesFlushForLogFileFull", ctypes.c_ushort),
        ("MftBitmapWritesLazyWriter", ctypes.c_ushort),
        ("MftBitmapWritesUserRequest", ctypes.c_ushort),
        ("MftBitmapWritesUserLevel", _MftBitmapWritesUserLevel_e__Struct),
        ("UserIndexReads", wintypes.DWORD),
        ("UserIndexReadBytes", wintypes.DWORD),
        ("UserIndexWrites", wintypes.DWORD),
        ("UserIndexWriteBytes", wintypes.DWORD),
        ("LogFileReads", wintypes.DWORD),
        ("LogFileReadBytes", wintypes.DWORD),
        ("LogFileWrites", wintypes.DWORD),
        ("LogFileWriteBytes", wintypes.DWORD),
        ("Allocate", _Allocate_e__Struct),
        ("DiskResourcesExhausted", wintypes.DWORD),
    ]
#[repr(C)]
pub struct NTFS_STATISTICS {
    pub LogFileFullExceptions: u32,
    pub OtherExceptions: u32,
    pub MftReads: u32,
    pub MftReadBytes: u32,
    pub MftWrites: u32,
    pub MftWriteBytes: u32,
    pub MftWritesUserLevel: _MftWritesUserLevel_e__Struct,
    pub MftWritesFlushForLogFileFull: u16,
    pub MftWritesLazyWriter: u16,
    pub MftWritesUserRequest: u16,
    pub Mft2Writes: u32,
    pub Mft2WriteBytes: u32,
    pub Mft2WritesUserLevel: _Mft2WritesUserLevel_e__Struct,
    pub Mft2WritesFlushForLogFileFull: u16,
    pub Mft2WritesLazyWriter: u16,
    pub Mft2WritesUserRequest: u16,
    pub RootIndexReads: u32,
    pub RootIndexReadBytes: u32,
    pub RootIndexWrites: u32,
    pub RootIndexWriteBytes: u32,
    pub BitmapReads: u32,
    pub BitmapReadBytes: u32,
    pub BitmapWrites: u32,
    pub BitmapWriteBytes: u32,
    pub BitmapWritesFlushForLogFileFull: u16,
    pub BitmapWritesLazyWriter: u16,
    pub BitmapWritesUserRequest: u16,
    pub BitmapWritesUserLevel: _BitmapWritesUserLevel_e__Struct,
    pub MftBitmapReads: u32,
    pub MftBitmapReadBytes: u32,
    pub MftBitmapWrites: u32,
    pub MftBitmapWriteBytes: u32,
    pub MftBitmapWritesFlushForLogFileFull: u16,
    pub MftBitmapWritesLazyWriter: u16,
    pub MftBitmapWritesUserRequest: u16,
    pub MftBitmapWritesUserLevel: _MftBitmapWritesUserLevel_e__Struct,
    pub UserIndexReads: u32,
    pub UserIndexReadBytes: u32,
    pub UserIndexWrites: u32,
    pub UserIndexWriteBytes: u32,
    pub LogFileReads: u32,
    pub LogFileReadBytes: u32,
    pub LogFileWrites: u32,
    pub LogFileWriteBytes: u32,
    pub Allocate: _Allocate_e__Struct,
    pub DiskResourcesExhausted: u32,
}
import "golang.org/x/sys/windows"

type NTFS_STATISTICS struct {
	LogFileFullExceptions uint32
	OtherExceptions uint32
	MftReads uint32
	MftReadBytes uint32
	MftWrites uint32
	MftWriteBytes uint32
	MftWritesUserLevel _MftWritesUserLevel_e__Struct
	MftWritesFlushForLogFileFull uint16
	MftWritesLazyWriter uint16
	MftWritesUserRequest uint16
	Mft2Writes uint32
	Mft2WriteBytes uint32
	Mft2WritesUserLevel _Mft2WritesUserLevel_e__Struct
	Mft2WritesFlushForLogFileFull uint16
	Mft2WritesLazyWriter uint16
	Mft2WritesUserRequest uint16
	RootIndexReads uint32
	RootIndexReadBytes uint32
	RootIndexWrites uint32
	RootIndexWriteBytes uint32
	BitmapReads uint32
	BitmapReadBytes uint32
	BitmapWrites uint32
	BitmapWriteBytes uint32
	BitmapWritesFlushForLogFileFull uint16
	BitmapWritesLazyWriter uint16
	BitmapWritesUserRequest uint16
	BitmapWritesUserLevel _BitmapWritesUserLevel_e__Struct
	MftBitmapReads uint32
	MftBitmapReadBytes uint32
	MftBitmapWrites uint32
	MftBitmapWriteBytes uint32
	MftBitmapWritesFlushForLogFileFull uint16
	MftBitmapWritesLazyWriter uint16
	MftBitmapWritesUserRequest uint16
	MftBitmapWritesUserLevel _MftBitmapWritesUserLevel_e__Struct
	UserIndexReads uint32
	UserIndexReadBytes uint32
	UserIndexWrites uint32
	UserIndexWriteBytes uint32
	LogFileReads uint32
	LogFileReadBytes uint32
	LogFileWrites uint32
	LogFileWriteBytes uint32
	Allocate _Allocate_e__Struct
	DiskResourcesExhausted uint32
}
type
  NTFS_STATISTICS = record
    LogFileFullExceptions: DWORD;
    OtherExceptions: DWORD;
    MftReads: DWORD;
    MftReadBytes: DWORD;
    MftWrites: DWORD;
    MftWriteBytes: DWORD;
    MftWritesUserLevel: _MftWritesUserLevel_e__Struct;
    MftWritesFlushForLogFileFull: Word;
    MftWritesLazyWriter: Word;
    MftWritesUserRequest: Word;
    Mft2Writes: DWORD;
    Mft2WriteBytes: DWORD;
    Mft2WritesUserLevel: _Mft2WritesUserLevel_e__Struct;
    Mft2WritesFlushForLogFileFull: Word;
    Mft2WritesLazyWriter: Word;
    Mft2WritesUserRequest: Word;
    RootIndexReads: DWORD;
    RootIndexReadBytes: DWORD;
    RootIndexWrites: DWORD;
    RootIndexWriteBytes: DWORD;
    BitmapReads: DWORD;
    BitmapReadBytes: DWORD;
    BitmapWrites: DWORD;
    BitmapWriteBytes: DWORD;
    BitmapWritesFlushForLogFileFull: Word;
    BitmapWritesLazyWriter: Word;
    BitmapWritesUserRequest: Word;
    BitmapWritesUserLevel: _BitmapWritesUserLevel_e__Struct;
    MftBitmapReads: DWORD;
    MftBitmapReadBytes: DWORD;
    MftBitmapWrites: DWORD;
    MftBitmapWriteBytes: DWORD;
    MftBitmapWritesFlushForLogFileFull: Word;
    MftBitmapWritesLazyWriter: Word;
    MftBitmapWritesUserRequest: Word;
    MftBitmapWritesUserLevel: _MftBitmapWritesUserLevel_e__Struct;
    UserIndexReads: DWORD;
    UserIndexReadBytes: DWORD;
    UserIndexWrites: DWORD;
    UserIndexWriteBytes: DWORD;
    LogFileReads: DWORD;
    LogFileReadBytes: DWORD;
    LogFileWrites: DWORD;
    LogFileWriteBytes: DWORD;
    Allocate: _Allocate_e__Struct;
    DiskResourcesExhausted: DWORD;
  end;
const NTFS_STATISTICS = extern struct {
    LogFileFullExceptions: u32,
    OtherExceptions: u32,
    MftReads: u32,
    MftReadBytes: u32,
    MftWrites: u32,
    MftWriteBytes: u32,
    MftWritesUserLevel: _MftWritesUserLevel_e__Struct,
    MftWritesFlushForLogFileFull: u16,
    MftWritesLazyWriter: u16,
    MftWritesUserRequest: u16,
    Mft2Writes: u32,
    Mft2WriteBytes: u32,
    Mft2WritesUserLevel: _Mft2WritesUserLevel_e__Struct,
    Mft2WritesFlushForLogFileFull: u16,
    Mft2WritesLazyWriter: u16,
    Mft2WritesUserRequest: u16,
    RootIndexReads: u32,
    RootIndexReadBytes: u32,
    RootIndexWrites: u32,
    RootIndexWriteBytes: u32,
    BitmapReads: u32,
    BitmapReadBytes: u32,
    BitmapWrites: u32,
    BitmapWriteBytes: u32,
    BitmapWritesFlushForLogFileFull: u16,
    BitmapWritesLazyWriter: u16,
    BitmapWritesUserRequest: u16,
    BitmapWritesUserLevel: _BitmapWritesUserLevel_e__Struct,
    MftBitmapReads: u32,
    MftBitmapReadBytes: u32,
    MftBitmapWrites: u32,
    MftBitmapWriteBytes: u32,
    MftBitmapWritesFlushForLogFileFull: u16,
    MftBitmapWritesLazyWriter: u16,
    MftBitmapWritesUserRequest: u16,
    MftBitmapWritesUserLevel: _MftBitmapWritesUserLevel_e__Struct,
    UserIndexReads: u32,
    UserIndexReadBytes: u32,
    UserIndexWrites: u32,
    UserIndexWriteBytes: u32,
    LogFileReads: u32,
    LogFileReadBytes: u32,
    LogFileWrites: u32,
    LogFileWriteBytes: u32,
    Allocate: _Allocate_e__Struct,
    DiskResourcesExhausted: u32,
};
type
  NTFS_STATISTICS {.bycopy.} = object
    LogFileFullExceptions: uint32
    OtherExceptions: uint32
    MftReads: uint32
    MftReadBytes: uint32
    MftWrites: uint32
    MftWriteBytes: uint32
    MftWritesUserLevel: _MftWritesUserLevel_e__Struct
    MftWritesFlushForLogFileFull: uint16
    MftWritesLazyWriter: uint16
    MftWritesUserRequest: uint16
    Mft2Writes: uint32
    Mft2WriteBytes: uint32
    Mft2WritesUserLevel: _Mft2WritesUserLevel_e__Struct
    Mft2WritesFlushForLogFileFull: uint16
    Mft2WritesLazyWriter: uint16
    Mft2WritesUserRequest: uint16
    RootIndexReads: uint32
    RootIndexReadBytes: uint32
    RootIndexWrites: uint32
    RootIndexWriteBytes: uint32
    BitmapReads: uint32
    BitmapReadBytes: uint32
    BitmapWrites: uint32
    BitmapWriteBytes: uint32
    BitmapWritesFlushForLogFileFull: uint16
    BitmapWritesLazyWriter: uint16
    BitmapWritesUserRequest: uint16
    BitmapWritesUserLevel: _BitmapWritesUserLevel_e__Struct
    MftBitmapReads: uint32
    MftBitmapReadBytes: uint32
    MftBitmapWrites: uint32
    MftBitmapWriteBytes: uint32
    MftBitmapWritesFlushForLogFileFull: uint16
    MftBitmapWritesLazyWriter: uint16
    MftBitmapWritesUserRequest: uint16
    MftBitmapWritesUserLevel: _MftBitmapWritesUserLevel_e__Struct
    UserIndexReads: uint32
    UserIndexReadBytes: uint32
    UserIndexWrites: uint32
    UserIndexWriteBytes: uint32
    LogFileReads: uint32
    LogFileReadBytes: uint32
    LogFileWrites: uint32
    LogFileWriteBytes: uint32
    Allocate: _Allocate_e__Struct
    DiskResourcesExhausted: uint32
struct NTFS_STATISTICS
{
    uint LogFileFullExceptions;
    uint OtherExceptions;
    uint MftReads;
    uint MftReadBytes;
    uint MftWrites;
    uint MftWriteBytes;
    _MftWritesUserLevel_e__Struct MftWritesUserLevel;
    ushort MftWritesFlushForLogFileFull;
    ushort MftWritesLazyWriter;
    ushort MftWritesUserRequest;
    uint Mft2Writes;
    uint Mft2WriteBytes;
    _Mft2WritesUserLevel_e__Struct Mft2WritesUserLevel;
    ushort Mft2WritesFlushForLogFileFull;
    ushort Mft2WritesLazyWriter;
    ushort Mft2WritesUserRequest;
    uint RootIndexReads;
    uint RootIndexReadBytes;
    uint RootIndexWrites;
    uint RootIndexWriteBytes;
    uint BitmapReads;
    uint BitmapReadBytes;
    uint BitmapWrites;
    uint BitmapWriteBytes;
    ushort BitmapWritesFlushForLogFileFull;
    ushort BitmapWritesLazyWriter;
    ushort BitmapWritesUserRequest;
    _BitmapWritesUserLevel_e__Struct BitmapWritesUserLevel;
    uint MftBitmapReads;
    uint MftBitmapReadBytes;
    uint MftBitmapWrites;
    uint MftBitmapWriteBytes;
    ushort MftBitmapWritesFlushForLogFileFull;
    ushort MftBitmapWritesLazyWriter;
    ushort MftBitmapWritesUserRequest;
    _MftBitmapWritesUserLevel_e__Struct MftBitmapWritesUserLevel;
    uint UserIndexReads;
    uint UserIndexReadBytes;
    uint UserIndexWrites;
    uint UserIndexWriteBytes;
    uint LogFileReads;
    uint LogFileReadBytes;
    uint LogFileWrites;
    uint LogFileWriteBytes;
    _Allocate_e__Struct Allocate;
    uint DiskResourcesExhausted;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NTFS_STATISTICS サイズ: 216 バイト(x64)
dim st, 54    ; 4byte整数×54(構造体サイズ 216 / 4 切り上げ)
; LogFileFullExceptions : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; OtherExceptions : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; MftReads : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; MftReadBytes : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; MftWrites : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; MftWriteBytes : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; MftWritesUserLevel : _MftWritesUserLevel_e__Struct (+24, 8byte)  varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; MftWritesFlushForLogFileFull : WORD (+32, 2byte)  wpoke st,32,値  /  値 = wpeek(st,32)
; MftWritesLazyWriter : WORD (+34, 2byte)  wpoke st,34,値  /  値 = wpeek(st,34)
; MftWritesUserRequest : WORD (+36, 2byte)  wpoke st,36,値  /  値 = wpeek(st,36)
; Mft2Writes : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; Mft2WriteBytes : DWORD (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; Mft2WritesUserLevel : _Mft2WritesUserLevel_e__Struct (+48, 8byte)  varptr(st)+48 を基点に操作(8byte:入れ子/配列)
; Mft2WritesFlushForLogFileFull : WORD (+56, 2byte)  wpoke st,56,値  /  値 = wpeek(st,56)
; Mft2WritesLazyWriter : WORD (+58, 2byte)  wpoke st,58,値  /  値 = wpeek(st,58)
; Mft2WritesUserRequest : WORD (+60, 2byte)  wpoke st,60,値  /  値 = wpeek(st,60)
; RootIndexReads : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; RootIndexReadBytes : DWORD (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; RootIndexWrites : DWORD (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; RootIndexWriteBytes : DWORD (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; BitmapReads : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; BitmapReadBytes : DWORD (+84, 4byte)  st.21 = 値  /  値 = st.21   (lpoke/lpeek も可)
; BitmapWrites : DWORD (+88, 4byte)  st.22 = 値  /  値 = st.22   (lpoke/lpeek も可)
; BitmapWriteBytes : DWORD (+92, 4byte)  st.23 = 値  /  値 = st.23   (lpoke/lpeek も可)
; BitmapWritesFlushForLogFileFull : WORD (+96, 2byte)  wpoke st,96,値  /  値 = wpeek(st,96)
; BitmapWritesLazyWriter : WORD (+98, 2byte)  wpoke st,98,値  /  値 = wpeek(st,98)
; BitmapWritesUserRequest : WORD (+100, 2byte)  wpoke st,100,値  /  値 = wpeek(st,100)
; BitmapWritesUserLevel : _BitmapWritesUserLevel_e__Struct (+102, 6byte)  varptr(st)+102 を基点に操作(6byte:入れ子/配列)
; MftBitmapReads : DWORD (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; MftBitmapReadBytes : DWORD (+112, 4byte)  st.28 = 値  /  値 = st.28   (lpoke/lpeek も可)
; MftBitmapWrites : DWORD (+116, 4byte)  st.29 = 値  /  値 = st.29   (lpoke/lpeek も可)
; MftBitmapWriteBytes : DWORD (+120, 4byte)  st.30 = 値  /  値 = st.30   (lpoke/lpeek も可)
; MftBitmapWritesFlushForLogFileFull : WORD (+124, 2byte)  wpoke st,124,値  /  値 = wpeek(st,124)
; MftBitmapWritesLazyWriter : WORD (+126, 2byte)  wpoke st,126,値  /  値 = wpeek(st,126)
; MftBitmapWritesUserRequest : WORD (+128, 2byte)  wpoke st,128,値  /  値 = wpeek(st,128)
; MftBitmapWritesUserLevel : _MftBitmapWritesUserLevel_e__Struct (+130, 8byte)  varptr(st)+130 を基点に操作(8byte:入れ子/配列)
; UserIndexReads : DWORD (+140, 4byte)  st.35 = 値  /  値 = st.35   (lpoke/lpeek も可)
; UserIndexReadBytes : DWORD (+144, 4byte)  st.36 = 値  /  値 = st.36   (lpoke/lpeek も可)
; UserIndexWrites : DWORD (+148, 4byte)  st.37 = 値  /  値 = st.37   (lpoke/lpeek も可)
; UserIndexWriteBytes : DWORD (+152, 4byte)  st.38 = 値  /  値 = st.38   (lpoke/lpeek も可)
; LogFileReads : DWORD (+156, 4byte)  st.39 = 値  /  値 = st.39   (lpoke/lpeek も可)
; LogFileReadBytes : DWORD (+160, 4byte)  st.40 = 値  /  値 = st.40   (lpoke/lpeek も可)
; LogFileWrites : DWORD (+164, 4byte)  st.41 = 値  /  値 = st.41   (lpoke/lpeek も可)
; LogFileWriteBytes : DWORD (+168, 4byte)  st.42 = 値  /  値 = st.42   (lpoke/lpeek も可)
; Allocate : _Allocate_e__Struct (+172, 40byte)  varptr(st)+172 を基点に操作(40byte:入れ子/配列)
; DiskResourcesExhausted : DWORD (+212, 4byte)  st.53 = 値  /  値 = st.53   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global NTFS_STATISTICS
    #field int LogFileFullExceptions
    #field int OtherExceptions
    #field int MftReads
    #field int MftReadBytes
    #field int MftWrites
    #field int MftWriteBytes
    #field _MftWritesUserLevel_e__Struct MftWritesUserLevel
    #field short MftWritesFlushForLogFileFull
    #field short MftWritesLazyWriter
    #field short MftWritesUserRequest
    #field int Mft2Writes
    #field int Mft2WriteBytes
    #field _Mft2WritesUserLevel_e__Struct Mft2WritesUserLevel
    #field short Mft2WritesFlushForLogFileFull
    #field short Mft2WritesLazyWriter
    #field short Mft2WritesUserRequest
    #field int RootIndexReads
    #field int RootIndexReadBytes
    #field int RootIndexWrites
    #field int RootIndexWriteBytes
    #field int BitmapReads
    #field int BitmapReadBytes
    #field int BitmapWrites
    #field int BitmapWriteBytes
    #field short BitmapWritesFlushForLogFileFull
    #field short BitmapWritesLazyWriter
    #field short BitmapWritesUserRequest
    #field _BitmapWritesUserLevel_e__Struct BitmapWritesUserLevel
    #field int MftBitmapReads
    #field int MftBitmapReadBytes
    #field int MftBitmapWrites
    #field int MftBitmapWriteBytes
    #field short MftBitmapWritesFlushForLogFileFull
    #field short MftBitmapWritesLazyWriter
    #field short MftBitmapWritesUserRequest
    #field _MftBitmapWritesUserLevel_e__Struct MftBitmapWritesUserLevel
    #field int UserIndexReads
    #field int UserIndexReadBytes
    #field int UserIndexWrites
    #field int UserIndexWriteBytes
    #field int LogFileReads
    #field int LogFileReadBytes
    #field int LogFileWrites
    #field int LogFileWriteBytes
    #field _Allocate_e__Struct Allocate
    #field int DiskResourcesExhausted
#endstruct

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