ホーム › Storage.VirtualDiskService › VDS_LUN_PLEX_PROP
VDS_LUN_PLEX_PROP
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| id | GUID | 16 | +0 | +0 | LUNプレックスを一意に識別するGUID。 |
| ullSize | ULONGLONG | 8 | +16 | +16 | プレックスの容量をバイト単位で示す。 |
| type | VDS_LUN_PLEX_TYPE | 4 | +24 | +24 | プレックスの種別を示すVDS_LUN_PLEX_TYPE列挙値。 |
| status | VDS_LUN_PLEX_STATUS | 4 | +28 | +28 | プレックスの状態を示すVDS_LUN_PLEX_STATUS列挙値。 |
| health | VDS_HEALTH | 4 | +32 | +32 | プレックスの正常性を示すVDS_HEALTH列挙値。 |
| TransitionState | VDS_TRANSITION_STATE | 4 | +36 | +36 | プレックスの遷移状態を示すVDS_TRANSITION_STATE列挙値。 |
| ulFlags | DWORD | 4 | +40 | +40 | プレックスの属性を示すVDS_LUN_PLEX_FLAGビットフラグ。 |
| ulStripeSize | DWORD | 4 | +44 | +44 | ストライプサイズをバイト単位で示す。 |
| sRebuildPriority | SHORT | 2 | +48 | +48 | アレイ再構築の優先度を示す符号付き値。 |
各言語での定義
#include <windows.h>
// VDS_LUN_PLEX_PROP (x64 56 / x86 56 バイト)
typedef struct VDS_LUN_PLEX_PROP {
GUID id;
ULONGLONG ullSize;
VDS_LUN_PLEX_TYPE type;
VDS_LUN_PLEX_STATUS status;
VDS_HEALTH health;
VDS_TRANSITION_STATE TransitionState;
DWORD ulFlags;
DWORD ulStripeSize;
SHORT sRebuildPriority;
} VDS_LUN_PLEX_PROP;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VDS_LUN_PLEX_PROP
{
public Guid id;
public ulong ullSize;
public int type;
public int status;
public int health;
public int TransitionState;
public uint ulFlags;
public uint ulStripeSize;
public short sRebuildPriority;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VDS_LUN_PLEX_PROP
Public id As Guid
Public ullSize As ULong
Public type As Integer
Public status As Integer
Public health As Integer
Public TransitionState As Integer
Public ulFlags As UInteger
Public ulStripeSize As UInteger
Public sRebuildPriority As Short
End Structureimport ctypes
from ctypes import wintypes
class VDS_LUN_PLEX_PROP(ctypes.Structure):
_fields_ = [
("id", GUID),
("ullSize", ctypes.c_ulonglong),
("type", ctypes.c_int),
("status", ctypes.c_int),
("health", ctypes.c_int),
("TransitionState", ctypes.c_int),
("ulFlags", wintypes.DWORD),
("ulStripeSize", wintypes.DWORD),
("sRebuildPriority", ctypes.c_short),
]#[repr(C)]
pub struct VDS_LUN_PLEX_PROP {
pub id: GUID,
pub ullSize: u64,
pub type: i32,
pub status: i32,
pub health: i32,
pub TransitionState: i32,
pub ulFlags: u32,
pub ulStripeSize: u32,
pub sRebuildPriority: i16,
}import "golang.org/x/sys/windows"
type VDS_LUN_PLEX_PROP struct {
id windows.GUID
ullSize uint64
type int32
status int32
health int32
TransitionState int32
ulFlags uint32
ulStripeSize uint32
sRebuildPriority int16
}type
VDS_LUN_PLEX_PROP = record
id: TGUID;
ullSize: UInt64;
type: Integer;
status: Integer;
health: Integer;
TransitionState: Integer;
ulFlags: DWORD;
ulStripeSize: DWORD;
sRebuildPriority: Smallint;
end;const VDS_LUN_PLEX_PROP = extern struct {
id: GUID,
ullSize: u64,
type: i32,
status: i32,
health: i32,
TransitionState: i32,
ulFlags: u32,
ulStripeSize: u32,
sRebuildPriority: i16,
};type
VDS_LUN_PLEX_PROP {.bycopy.} = object
id: GUID
ullSize: uint64
type: int32
status: int32
health: int32
TransitionState: int32
ulFlags: uint32
ulStripeSize: uint32
sRebuildPriority: int16struct VDS_LUN_PLEX_PROP
{
GUID id;
ulong ullSize;
int type;
int status;
int health;
int TransitionState;
uint ulFlags;
uint ulStripeSize;
short sRebuildPriority;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VDS_LUN_PLEX_PROP サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; id : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; ullSize : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; type : VDS_LUN_PLEX_TYPE (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; status : VDS_LUN_PLEX_STATUS (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; health : VDS_HEALTH (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; TransitionState : VDS_TRANSITION_STATE (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; ulFlags : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ulStripeSize : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; sRebuildPriority : SHORT (+48, 2byte) wpoke st,48,値 / 値 = wpeek(st,48)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global VDS_LUN_PLEX_PROP
#field GUID id
#field int64 ullSize
#field int type
#field int status
#field int health
#field int TransitionState
#field int ulFlags
#field int ulStripeSize
#field short sRebuildPriority
#endstruct
stdim st, VDS_LUN_PLEX_PROP ; NSTRUCT 変数を確保
st->ullSize = 100
mes "ullSize=" + st->ullSize