ホーム › System.Ioctl › RETRIEVAL_POINTERS_BUFFER
RETRIEVAL_POINTERS_BUFFER
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ExtentCount | DWORD | 4 | +0 | +0 | Extents配列に含まれるエクステントの数。 |
| StartingVcn | LONGLONG | 8 | +8 | +8 | 最初のエクステントの開始仮想クラスタ番号(VCN)。 |
| Extents | _Anonymous_e__Struct | 16 | +16 | +16 | VCNとLCNの対応を表すエクステント配列。先頭要素。 |
構造体: _Anonymous_e__Struct x64 16B / x86 16B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| NextVcn | LONGLONG | 8 | +0 | +0 |
| Lcn | LONGLONG | 8 | +8 | +8 |
各言語での定義
#include <windows.h>
// RETRIEVAL_POINTERS_BUFFER (x64 32 / x86 32 バイト)
typedef struct RETRIEVAL_POINTERS_BUFFER {
DWORD ExtentCount;
LONGLONG StartingVcn;
_Anonymous_e__Struct Extents[1];
} RETRIEVAL_POINTERS_BUFFER;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RETRIEVAL_POINTERS_BUFFER
{
public uint ExtentCount;
public long StartingVcn;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public _Anonymous_e__Struct[] Extents;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RETRIEVAL_POINTERS_BUFFER
Public ExtentCount As UInteger
Public StartingVcn As Long
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public Extents() As _Anonymous_e__Struct
End Structureimport ctypes
from ctypes import wintypes
class RETRIEVAL_POINTERS_BUFFER(ctypes.Structure):
_fields_ = [
("ExtentCount", wintypes.DWORD),
("StartingVcn", ctypes.c_longlong),
("Extents", _Anonymous_e__Struct * 1),
]#[repr(C)]
pub struct RETRIEVAL_POINTERS_BUFFER {
pub ExtentCount: u32,
pub StartingVcn: i64,
pub Extents: [_Anonymous_e__Struct; 1],
}import "golang.org/x/sys/windows"
type RETRIEVAL_POINTERS_BUFFER struct {
ExtentCount uint32
StartingVcn int64
Extents [1]_Anonymous_e__Struct
}type
RETRIEVAL_POINTERS_BUFFER = record
ExtentCount: DWORD;
StartingVcn: Int64;
Extents: array[0..0] of _Anonymous_e__Struct;
end;const RETRIEVAL_POINTERS_BUFFER = extern struct {
ExtentCount: u32,
StartingVcn: i64,
Extents: [1]_Anonymous_e__Struct,
};type
RETRIEVAL_POINTERS_BUFFER {.bycopy.} = object
ExtentCount: uint32
StartingVcn: int64
Extents: array[1, _Anonymous_e__Struct]struct RETRIEVAL_POINTERS_BUFFER
{
uint ExtentCount;
long StartingVcn;
_Anonymous_e__Struct[1] Extents;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RETRIEVAL_POINTERS_BUFFER サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; ExtentCount : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; StartingVcn : LONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; Extents : _Anonymous_e__Struct (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global RETRIEVAL_POINTERS_BUFFER
#field int ExtentCount
#field int64 StartingVcn
#field _Anonymous_e__Struct Extents 1
#endstruct
stdim st, RETRIEVAL_POINTERS_BUFFER ; NSTRUCT 変数を確保
st->ExtentCount = 100
mes "ExtentCount=" + st->ExtentCount