ホーム › System.Ioctl › DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2
DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2
構造体サイズ=各フィールドのバイト数(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 | ULONGLONG | 8 | +16 | +16 | ビットマップ開始位置のオフセットデルタをバイト単位で示す(64ビット)。 |
| SlabAllocationBitMapBitCount | DWORD | 4 | +24 | +24 | スラブ割り当てビットマップの有効ビット数。 |
| SlabAllocationBitMapLength | DWORD | 4 | +28 | +28 | スラブ割り当てビットマップ配列の要素数(DWORD単位)。 |
| SlabAllocationBitMap | DWORD | 4 | +32 | +32 | 各スラブの割り当て状態を表すビットマップの可変長配列。 |
各言語での定義
#include <windows.h>
// DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 (x64 40 / x86 40 バイト)
typedef struct DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 {
DWORD Size;
DWORD Version;
ULONGLONG SlabSizeInBytes;
ULONGLONG SlabOffsetDeltaInBytes;
DWORD SlabAllocationBitMapBitCount;
DWORD SlabAllocationBitMapLength;
DWORD SlabAllocationBitMap[1];
} DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2
{
public uint Size;
public uint Version;
public ulong SlabSizeInBytes;
public ulong 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_V2
Public Size As UInteger
Public Version As UInteger
Public SlabSizeInBytes As ULong
Public SlabOffsetDeltaInBytes As ULong
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_V2(ctypes.Structure):
_fields_ = [
("Size", wintypes.DWORD),
("Version", wintypes.DWORD),
("SlabSizeInBytes", ctypes.c_ulonglong),
("SlabOffsetDeltaInBytes", ctypes.c_ulonglong),
("SlabAllocationBitMapBitCount", wintypes.DWORD),
("SlabAllocationBitMapLength", wintypes.DWORD),
("SlabAllocationBitMap", wintypes.DWORD * 1),
]#[repr(C)]
pub struct DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 {
pub Size: u32,
pub Version: u32,
pub SlabSizeInBytes: u64,
pub SlabOffsetDeltaInBytes: u64,
pub SlabAllocationBitMapBitCount: u32,
pub SlabAllocationBitMapLength: u32,
pub SlabAllocationBitMap: [u32; 1],
}import "golang.org/x/sys/windows"
type DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 struct {
Size uint32
Version uint32
SlabSizeInBytes uint64
SlabOffsetDeltaInBytes uint64
SlabAllocationBitMapBitCount uint32
SlabAllocationBitMapLength uint32
SlabAllocationBitMap [1]uint32
}type
DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 = record
Size: DWORD;
Version: DWORD;
SlabSizeInBytes: UInt64;
SlabOffsetDeltaInBytes: UInt64;
SlabAllocationBitMapBitCount: DWORD;
SlabAllocationBitMapLength: DWORD;
SlabAllocationBitMap: array[0..0] of DWORD;
end;const DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 = extern struct {
Size: u32,
Version: u32,
SlabSizeInBytes: u64,
SlabOffsetDeltaInBytes: u64,
SlabAllocationBitMapBitCount: u32,
SlabAllocationBitMapLength: u32,
SlabAllocationBitMap: [1]u32,
};type
DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 {.bycopy.} = object
Size: uint32
Version: uint32
SlabSizeInBytes: uint64
SlabOffsetDeltaInBytes: uint64
SlabAllocationBitMapBitCount: uint32
SlabAllocationBitMapLength: uint32
SlabAllocationBitMap: array[1, uint32]struct DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2
{
uint Size;
uint Version;
ulong SlabSizeInBytes;
ulong 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_V2 サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 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 : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; SlabAllocationBitMapBitCount : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; SlabAllocationBitMapLength : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; SlabAllocationBitMap : DWORD (+32, 4byte) varptr(st)+32 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2
#field int Size
#field int Version
#field int64 SlabSizeInBytes
#field int64 SlabOffsetDeltaInBytes
#field int SlabAllocationBitMapBitCount
#field int SlabAllocationBitMapLength
#field int SlabAllocationBitMap 1
#endstruct
stdim st, DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size