ホーム › System.Ioctl › DEVICE_DATA_SET_LB_PROVISIONING_STATE
DEVICE_DATA_SET_LB_PROVISIONING_STATE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Size | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で示す。 |
| Version | DWORD | 4 | +4 | +4 | 構造体のバージョン番号。 |
| SlabSizeInBytes | ULONGLONG | 8 | +8 | +8 | スラブ(割り当て単位)のサイズをバイト単位で示す。 |
| SlabOffsetDeltaInBytes | DWORD | 4 | +16 | +16 | ビットマップ開始位置のオフセットデルタをバイト単位で示す。 |
| SlabAllocationBitMapBitCount | DWORD | 4 | +20 | +20 | スラブ割り当てビットマップの有効ビット数。 |
| SlabAllocationBitMapLength | DWORD | 4 | +24 | +24 | スラブ割り当てビットマップ配列の要素数(DWORD単位)。 |
| SlabAllocationBitMap | DWORD | 4 | +28 | +28 | 各スラブの割り当て状態を表すビットマップの可変長配列。 |
各言語での定義
#include <windows.h>
// DEVICE_DATA_SET_LB_PROVISIONING_STATE (x64 32 / x86 32 バイト)
typedef struct DEVICE_DATA_SET_LB_PROVISIONING_STATE {
DWORD Size;
DWORD Version;
ULONGLONG SlabSizeInBytes;
DWORD SlabOffsetDeltaInBytes;
DWORD SlabAllocationBitMapBitCount;
DWORD SlabAllocationBitMapLength;
DWORD SlabAllocationBitMap[1];
} DEVICE_DATA_SET_LB_PROVISIONING_STATE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DEVICE_DATA_SET_LB_PROVISIONING_STATE
{
public uint Size;
public uint Version;
public ulong SlabSizeInBytes;
public uint SlabOffsetDeltaInBytes;
public uint SlabAllocationBitMapBitCount;
public uint SlabAllocationBitMapLength;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public uint[] SlabAllocationBitMap;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DEVICE_DATA_SET_LB_PROVISIONING_STATE
Public Size As UInteger
Public Version As UInteger
Public SlabSizeInBytes As ULong
Public SlabOffsetDeltaInBytes As UInteger
Public SlabAllocationBitMapBitCount As UInteger
Public SlabAllocationBitMapLength As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public SlabAllocationBitMap() As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DEVICE_DATA_SET_LB_PROVISIONING_STATE(ctypes.Structure):
_fields_ = [
("Size", wintypes.DWORD),
("Version", wintypes.DWORD),
("SlabSizeInBytes", ctypes.c_ulonglong),
("SlabOffsetDeltaInBytes", wintypes.DWORD),
("SlabAllocationBitMapBitCount", wintypes.DWORD),
("SlabAllocationBitMapLength", wintypes.DWORD),
("SlabAllocationBitMap", wintypes.DWORD * 1),
]#[repr(C)]
pub struct DEVICE_DATA_SET_LB_PROVISIONING_STATE {
pub Size: u32,
pub Version: u32,
pub SlabSizeInBytes: u64,
pub SlabOffsetDeltaInBytes: u32,
pub SlabAllocationBitMapBitCount: u32,
pub SlabAllocationBitMapLength: u32,
pub SlabAllocationBitMap: [u32; 1],
}import "golang.org/x/sys/windows"
type DEVICE_DATA_SET_LB_PROVISIONING_STATE struct {
Size uint32
Version uint32
SlabSizeInBytes uint64
SlabOffsetDeltaInBytes uint32
SlabAllocationBitMapBitCount uint32
SlabAllocationBitMapLength uint32
SlabAllocationBitMap [1]uint32
}type
DEVICE_DATA_SET_LB_PROVISIONING_STATE = record
Size: DWORD;
Version: DWORD;
SlabSizeInBytes: UInt64;
SlabOffsetDeltaInBytes: DWORD;
SlabAllocationBitMapBitCount: DWORD;
SlabAllocationBitMapLength: DWORD;
SlabAllocationBitMap: array[0..0] of DWORD;
end;const DEVICE_DATA_SET_LB_PROVISIONING_STATE = extern struct {
Size: u32,
Version: u32,
SlabSizeInBytes: u64,
SlabOffsetDeltaInBytes: u32,
SlabAllocationBitMapBitCount: u32,
SlabAllocationBitMapLength: u32,
SlabAllocationBitMap: [1]u32,
};type
DEVICE_DATA_SET_LB_PROVISIONING_STATE {.bycopy.} = object
Size: uint32
Version: uint32
SlabSizeInBytes: uint64
SlabOffsetDeltaInBytes: uint32
SlabAllocationBitMapBitCount: uint32
SlabAllocationBitMapLength: uint32
SlabAllocationBitMap: array[1, uint32]struct DEVICE_DATA_SET_LB_PROVISIONING_STATE
{
uint Size;
uint Version;
ulong SlabSizeInBytes;
uint SlabOffsetDeltaInBytes;
uint SlabAllocationBitMapBitCount;
uint SlabAllocationBitMapLength;
uint[1] SlabAllocationBitMap;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DEVICE_DATA_SET_LB_PROVISIONING_STATE サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Size : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Version : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; SlabSizeInBytes : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; SlabOffsetDeltaInBytes : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; SlabAllocationBitMapBitCount : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; SlabAllocationBitMapLength : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; SlabAllocationBitMap : DWORD (+28, 4byte) varptr(st)+28 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DEVICE_DATA_SET_LB_PROVISIONING_STATE
#field int Size
#field int Version
#field int64 SlabSizeInBytes
#field int SlabOffsetDeltaInBytes
#field int SlabAllocationBitMapBitCount
#field int SlabAllocationBitMapLength
#field int SlabAllocationBitMap 1
#endstruct
stdim st, DEVICE_DATA_SET_LB_PROVISIONING_STATE ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size