ホーム › System.Ioctl › FS_BPIO_INFO
FS_BPIO_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ActiveBypassIoCount | DWORD | 4 | +0 | +0 | 現在アクティブなBypassIOの数。 |
| StorageDriverNameLen | WORD | 2 | +4 | +4 | StorageDriverName文字列のバイト単位長さ。 |
| StorageDriverName | WCHAR | 64 | +6 | +6 | BypassIOを処理するストレージドライバー名の可変長WCHAR文字列の先頭。 |
各言語での定義
#include <windows.h>
// FS_BPIO_INFO (x64 72 / x86 72 バイト)
typedef struct FS_BPIO_INFO {
DWORD ActiveBypassIoCount;
WORD StorageDriverNameLen;
WCHAR StorageDriverName[32];
} FS_BPIO_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FS_BPIO_INFO
{
public uint ActiveBypassIoCount;
public ushort StorageDriverNameLen;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string StorageDriverName;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FS_BPIO_INFO
Public ActiveBypassIoCount As UInteger
Public StorageDriverNameLen As UShort
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public StorageDriverName As String
End Structureimport ctypes
from ctypes import wintypes
class FS_BPIO_INFO(ctypes.Structure):
_fields_ = [
("ActiveBypassIoCount", wintypes.DWORD),
("StorageDriverNameLen", ctypes.c_ushort),
("StorageDriverName", ctypes.c_wchar * 32),
]#[repr(C)]
pub struct FS_BPIO_INFO {
pub ActiveBypassIoCount: u32,
pub StorageDriverNameLen: u16,
pub StorageDriverName: [u16; 32],
}import "golang.org/x/sys/windows"
type FS_BPIO_INFO struct {
ActiveBypassIoCount uint32
StorageDriverNameLen uint16
StorageDriverName [32]uint16
}type
FS_BPIO_INFO = record
ActiveBypassIoCount: DWORD;
StorageDriverNameLen: Word;
StorageDriverName: array[0..31] of WideChar;
end;const FS_BPIO_INFO = extern struct {
ActiveBypassIoCount: u32,
StorageDriverNameLen: u16,
StorageDriverName: [32]u16,
};type
FS_BPIO_INFO {.bycopy.} = object
ActiveBypassIoCount: uint32
StorageDriverNameLen: uint16
StorageDriverName: array[32, uint16]struct FS_BPIO_INFO
{
uint ActiveBypassIoCount;
ushort StorageDriverNameLen;
wchar[32] StorageDriverName;
}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_INFO サイズ: 72 バイト(x64)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; ActiveBypassIoCount : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; StorageDriverNameLen : WORD (+4, 2byte) wpoke st,4,値 / 値 = wpeek(st,4)
; StorageDriverName : WCHAR (+6, 64byte) varptr(st)+6 を基点に操作(64byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global FS_BPIO_INFO
#field int ActiveBypassIoCount
#field short StorageDriverNameLen
#field wchar StorageDriverName 32
#endstruct
stdim st, FS_BPIO_INFO ; NSTRUCT 変数を確保
st->ActiveBypassIoCount = 100
mes "ActiveBypassIoCount=" + st->ActiveBypassIoCount