ホーム › Storage.VirtualDiskService › VDS_PATH_INFO
VDS_PATH_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pathId | VDS_PATH_ID | 16 | +0 | +0 | MPIO が使用するパスの一意の ID です。 |
| type | VDS_HWPROVIDER_TYPE | 4 | +16 | +16 | この LUN パスに対してハードウェア プロバイダーがサポートするインターコネクトの種類です。VDS_HWT_HYBRID は、プロバイダーがハイブリッド プロバイダーであっても、このメンバーの有効な値ではありません。 |
| status | VDS_PATH_STATUS | 4 | +20 | +20 | パスの状態です。 VDS_PATH_STATUS によって列挙されます。 |
| Anonymous1 | _Anonymous1_e__Union | 16 | +24 | +24 | プロバイダー種別に応じたパス情報を格納する無名共用体その1。 |
| Anonymous2 | _Anonymous2_e__Union | 16 | +40 | +40 | プロバイダー種別に応じたパス情報を格納する無名共用体その2。 |
| Anonymous3 | _Anonymous3_e__Union | 8/4 | +56 | +56 | プロバイダー種別に応じたパス情報を格納する無名共用体その3。 |
共用体: _Anonymous1_e__Union x64 16B / x86 16B
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| controllerPortId | GUID | 16 | +0 | +0 | パスのもう一方の端にあるコントローラー ポート オブジェクトの VDS_OBJECT_ID です。 |
| targetPortalId | GUID | 16 | +0 | +0 | パスのもう一方の端にあるターゲット ポータル オブジェクトの VDS_OBJECT_ID です。 |
共用体: _Anonymous2_e__Union x64 16B / x86 16B
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| hbaPortId | GUID | 16 | +0 | +0 | HBA ポートの VDS_OBJECT_ID です。 |
| initiatorAdapterId | GUID | 16 | +0 | +0 | イニシエーター アダプターの VDS_OBJECT_ID です。 |
共用体: _Anonymous3_e__Union x64 8B / x86 4B
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pHbaPortProp | VDS_HBAPORT_PROP* | 8/4 | +0 | +0 | パスの一方の端にある HBA ポートのプロパティを格納する VDS_HBAPORT_PROP 構造体へのポインターです。 |
| pInitiatorPortalIpAddr | VDS_IPADDRESS* | 8/4 | +0 | +0 | イニシエーター ポータルの IP アドレスとポート情報を格納する VDS_IPADDRESS 構造体へのポインターです。 |
公式ドキュメント
[Windows 8 および Windows Server 2012 以降、Virtual Disk Service COM インターフェイスは Windows Storage Management API に置き換えられています。]
LUN パスの情報を定義します。この構造体は、IVdsLunMpio::GetPathInfo メソッドの ppPaths パラメーターで返されます。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// VDS_PATH_ID (x64 16 / x86 16 バイト)
typedef struct VDS_PATH_ID {
ULONGLONG ullSourceId;
ULONGLONG ullPathId;
} VDS_PATH_ID;
// VDS_PATH_INFO (x64 64 / x86 64 バイト)
typedef struct VDS_PATH_INFO {
VDS_PATH_ID pathId;
VDS_HWPROVIDER_TYPE type;
VDS_PATH_STATUS status;
_Anonymous1_e__Union Anonymous1;
_Anonymous2_e__Union Anonymous2;
_Anonymous3_e__Union Anonymous3;
} VDS_PATH_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VDS_PATH_ID
{
public ulong ullSourceId;
public ulong ullPathId;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VDS_PATH_INFO
{
public VDS_PATH_ID pathId;
public int type;
public int status;
public _Anonymous1_e__Union Anonymous1;
public _Anonymous2_e__Union Anonymous2;
public _Anonymous3_e__Union Anonymous3;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VDS_PATH_ID
Public ullSourceId As ULong
Public ullPathId As ULong
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VDS_PATH_INFO
Public pathId As VDS_PATH_ID
Public type As Integer
Public status As Integer
Public Anonymous1 As _Anonymous1_e__Union
Public Anonymous2 As _Anonymous2_e__Union
Public Anonymous3 As _Anonymous3_e__Union
End Structureimport ctypes
from ctypes import wintypes
class VDS_PATH_ID(ctypes.Structure):
_fields_ = [
("ullSourceId", ctypes.c_ulonglong),
("ullPathId", ctypes.c_ulonglong),
]
class VDS_PATH_INFO(ctypes.Structure):
_fields_ = [
("pathId", VDS_PATH_ID),
("type", ctypes.c_int),
("status", ctypes.c_int),
("Anonymous1", _Anonymous1_e__Union),
("Anonymous2", _Anonymous2_e__Union),
("Anonymous3", _Anonymous3_e__Union),
]#[repr(C)]
pub struct VDS_PATH_ID {
pub ullSourceId: u64,
pub ullPathId: u64,
}
#[repr(C)]
pub struct VDS_PATH_INFO {
pub pathId: VDS_PATH_ID,
pub type: i32,
pub status: i32,
pub Anonymous1: _Anonymous1_e__Union,
pub Anonymous2: _Anonymous2_e__Union,
pub Anonymous3: _Anonymous3_e__Union,
}import "golang.org/x/sys/windows"
type VDS_PATH_ID struct {
ullSourceId uint64
ullPathId uint64
}
type VDS_PATH_INFO struct {
pathId VDS_PATH_ID
type int32
status int32
Anonymous1 _Anonymous1_e__Union
Anonymous2 _Anonymous2_e__Union
Anonymous3 _Anonymous3_e__Union
}type
VDS_PATH_ID = record
ullSourceId: UInt64;
ullPathId: UInt64;
end;
VDS_PATH_INFO = record
pathId: VDS_PATH_ID;
type: Integer;
status: Integer;
Anonymous1: _Anonymous1_e__Union;
Anonymous2: _Anonymous2_e__Union;
Anonymous3: _Anonymous3_e__Union;
end;const VDS_PATH_ID = extern struct {
ullSourceId: u64,
ullPathId: u64,
};
const VDS_PATH_INFO = extern struct {
pathId: VDS_PATH_ID,
type: i32,
status: i32,
Anonymous1: _Anonymous1_e__Union,
Anonymous2: _Anonymous2_e__Union,
Anonymous3: _Anonymous3_e__Union,
};type
VDS_PATH_ID {.bycopy.} = object
ullSourceId: uint64
ullPathId: uint64
VDS_PATH_INFO {.bycopy.} = object
pathId: VDS_PATH_ID
type: int32
status: int32
Anonymous1: _Anonymous1_e__Union
Anonymous2: _Anonymous2_e__Union
Anonymous3: _Anonymous3_e__Unionstruct VDS_PATH_ID
{
ulong ullSourceId;
ulong ullPathId;
}
struct VDS_PATH_INFO
{
VDS_PATH_ID pathId;
int type;
int status;
_Anonymous1_e__Union Anonymous1;
_Anonymous2_e__Union Anonymous2;
_Anonymous3_e__Union Anonymous3;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; VDS_PATH_INFO サイズ: 64 バイト(x86)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; pathId : VDS_PATH_ID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; type : VDS_HWPROVIDER_TYPE (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; status : VDS_PATH_STATUS (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Anonymous1 : _Anonymous1_e__Union (+24, 16byte) varptr(st)+24 を基点に操作(16byte:入れ子/配列)
; Anonymous2 : _Anonymous2_e__Union (+40, 16byte) varptr(st)+40 を基点に操作(16byte:入れ子/配列)
; Anonymous3 : _Anonymous3_e__Union (+56, 4byte) varptr(st)+56 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VDS_PATH_INFO サイズ: 64 バイト(x64)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; pathId : VDS_PATH_ID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; type : VDS_HWPROVIDER_TYPE (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; status : VDS_PATH_STATUS (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Anonymous1 : _Anonymous1_e__Union (+24, 16byte) varptr(st)+24 を基点に操作(16byte:入れ子/配列)
; Anonymous2 : _Anonymous2_e__Union (+40, 16byte) varptr(st)+40 を基点に操作(16byte:入れ子/配列)
; Anonymous3 : _Anonymous3_e__Union (+56, 8byte) varptr(st)+56 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global VDS_PATH_ID
#field int64 ullSourceId
#field int64 ullPathId
#endstruct
#defstruct global VDS_PATH_INFO
#field VDS_PATH_ID pathId
#field int type
#field int status
#field byte Anonymous1 16
#field byte Anonymous2 16
#field byte Anonymous3 8
#endstruct
stdim st, VDS_PATH_INFO ; NSTRUCT 変数を確保
st->type = 100
mes "type=" + st->type
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。