ホーム › Storage.VirtualDiskService › VDS_VOLUME_PLEX_PROP
VDS_VOLUME_PLEX_PROP
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| id | GUID | 16 | +0 | +0 | ボリュームプレックスを一意に識別するGUID。 |
| type | VDS_VOLUME_PLEX_TYPE | 4 | +16 | +16 | プレックスの種別を示すVDS_VOLUME_PLEX_TYPE列挙値。 |
| status | VDS_VOLUME_PLEX_STATUS | 4 | +20 | +20 | プレックスの状態を示すVDS_VOLUME_PLEX_STATUS列挙値。 |
| health | VDS_HEALTH | 4 | +24 | +24 | プレックスの正常性を示すVDS_HEALTH列挙値。 |
| TransitionState | VDS_TRANSITION_STATE | 4 | +28 | +28 | プレックスの遷移状態を示すVDS_TRANSITION_STATE列挙値。 |
| ullSize | ULONGLONG | 8 | +32 | +32 | プレックスの容量をバイト単位で示す。 |
| ulStripeSize | DWORD | 4 | +40 | +40 | ストライプサイズをバイト単位で示す。 |
| ulNumberOfMembers | DWORD | 4 | +44 | +44 | プレックスを構成するメンバー数。 |
各言語での定義
#include <windows.h>
// VDS_VOLUME_PLEX_PROP (x64 48 / x86 48 バイト)
typedef struct VDS_VOLUME_PLEX_PROP {
GUID id;
VDS_VOLUME_PLEX_TYPE type;
VDS_VOLUME_PLEX_STATUS status;
VDS_HEALTH health;
VDS_TRANSITION_STATE TransitionState;
ULONGLONG ullSize;
DWORD ulStripeSize;
DWORD ulNumberOfMembers;
} VDS_VOLUME_PLEX_PROP;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VDS_VOLUME_PLEX_PROP
{
public Guid id;
public int type;
public int status;
public int health;
public int TransitionState;
public ulong ullSize;
public uint ulStripeSize;
public uint ulNumberOfMembers;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VDS_VOLUME_PLEX_PROP
Public id As Guid
Public type As Integer
Public status As Integer
Public health As Integer
Public TransitionState As Integer
Public ullSize As ULong
Public ulStripeSize As UInteger
Public ulNumberOfMembers As UInteger
End Structureimport ctypes
from ctypes import wintypes
class VDS_VOLUME_PLEX_PROP(ctypes.Structure):
_fields_ = [
("id", GUID),
("type", ctypes.c_int),
("status", ctypes.c_int),
("health", ctypes.c_int),
("TransitionState", ctypes.c_int),
("ullSize", ctypes.c_ulonglong),
("ulStripeSize", wintypes.DWORD),
("ulNumberOfMembers", wintypes.DWORD),
]#[repr(C)]
pub struct VDS_VOLUME_PLEX_PROP {
pub id: GUID,
pub type: i32,
pub status: i32,
pub health: i32,
pub TransitionState: i32,
pub ullSize: u64,
pub ulStripeSize: u32,
pub ulNumberOfMembers: u32,
}import "golang.org/x/sys/windows"
type VDS_VOLUME_PLEX_PROP struct {
id windows.GUID
type int32
status int32
health int32
TransitionState int32
ullSize uint64
ulStripeSize uint32
ulNumberOfMembers uint32
}type
VDS_VOLUME_PLEX_PROP = record
id: TGUID;
type: Integer;
status: Integer;
health: Integer;
TransitionState: Integer;
ullSize: UInt64;
ulStripeSize: DWORD;
ulNumberOfMembers: DWORD;
end;const VDS_VOLUME_PLEX_PROP = extern struct {
id: GUID,
type: i32,
status: i32,
health: i32,
TransitionState: i32,
ullSize: u64,
ulStripeSize: u32,
ulNumberOfMembers: u32,
};type
VDS_VOLUME_PLEX_PROP {.bycopy.} = object
id: GUID
type: int32
status: int32
health: int32
TransitionState: int32
ullSize: uint64
ulStripeSize: uint32
ulNumberOfMembers: uint32struct VDS_VOLUME_PLEX_PROP
{
GUID id;
int type;
int status;
int health;
int TransitionState;
ulong ullSize;
uint ulStripeSize;
uint ulNumberOfMembers;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VDS_VOLUME_PLEX_PROP サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; id : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; type : VDS_VOLUME_PLEX_TYPE (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; status : VDS_VOLUME_PLEX_STATUS (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; health : VDS_HEALTH (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; TransitionState : VDS_TRANSITION_STATE (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ullSize : ULONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ulStripeSize : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ulNumberOfMembers : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※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_VOLUME_PLEX_PROP
#field GUID id
#field int type
#field int status
#field int health
#field int TransitionState
#field int64 ullSize
#field int ulStripeSize
#field int ulNumberOfMembers
#endstruct
stdim st, VDS_VOLUME_PLEX_PROP ; NSTRUCT 変数を確保
st->type = 100
mes "type=" + st->type