Win32 API 日本語リファレンス
ホームSystem.Ioctl › CSV_QUERY_MDS_PATH_V2

CSV_QUERY_MDS_PATH_V2

構造体
サイズx64: 64 バイト / x86: 64 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
VersionLONGLONG8+0+0この構造体のバージョン番号。
RequiredSizeDWORD4+8+8全データの取得に必要なバッファサイズ(バイト)。
MdsNodeIdDWORD4+12+12メタデータサーバー(調整ノード)のノードID。
DsNodeIdDWORD4+16+16データサーバー(現ノード)のノードID。
FlagsDWORD4+20+20問い合わせ結果に関するフラグ。
DiskConnectivityCSVFS_DISK_CONNECTIVITY4+24+24ディスク接続状態を示す列挙値。
VolumeIdGUID16+28+28対象ボリュームを識別するGUID。
IpAddressOffsetDWORD4+44+44IPアドレス文字列へのオフセット(バイト)。
IpAddressLengthDWORD4+48+48IPアドレス文字列の長さ(バイト)。
PathOffsetDWORD4+52+52パス文字列へのオフセット(バイト)。
PathLengthDWORD4+56+56パス文字列の長さ(バイト)。

各言語での定義

#include <windows.h>

// CSV_QUERY_MDS_PATH_V2  (x64 64 / x86 64 バイト)
typedef struct CSV_QUERY_MDS_PATH_V2 {
    LONGLONG Version;
    DWORD RequiredSize;
    DWORD MdsNodeId;
    DWORD DsNodeId;
    DWORD Flags;
    CSVFS_DISK_CONNECTIVITY DiskConnectivity;
    GUID VolumeId;
    DWORD IpAddressOffset;
    DWORD IpAddressLength;
    DWORD PathOffset;
    DWORD PathLength;
} CSV_QUERY_MDS_PATH_V2;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CSV_QUERY_MDS_PATH_V2
{
    public long Version;
    public uint RequiredSize;
    public uint MdsNodeId;
    public uint DsNodeId;
    public uint Flags;
    public int DiskConnectivity;
    public Guid VolumeId;
    public uint IpAddressOffset;
    public uint IpAddressLength;
    public uint PathOffset;
    public uint PathLength;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CSV_QUERY_MDS_PATH_V2
    Public Version As Long
    Public RequiredSize As UInteger
    Public MdsNodeId As UInteger
    Public DsNodeId As UInteger
    Public Flags As UInteger
    Public DiskConnectivity As Integer
    Public VolumeId As Guid
    Public IpAddressOffset As UInteger
    Public IpAddressLength As UInteger
    Public PathOffset As UInteger
    Public PathLength As UInteger
End Structure
import ctypes
from ctypes import wintypes

class CSV_QUERY_MDS_PATH_V2(ctypes.Structure):
    _fields_ = [
        ("Version", ctypes.c_longlong),
        ("RequiredSize", wintypes.DWORD),
        ("MdsNodeId", wintypes.DWORD),
        ("DsNodeId", wintypes.DWORD),
        ("Flags", wintypes.DWORD),
        ("DiskConnectivity", ctypes.c_int),
        ("VolumeId", GUID),
        ("IpAddressOffset", wintypes.DWORD),
        ("IpAddressLength", wintypes.DWORD),
        ("PathOffset", wintypes.DWORD),
        ("PathLength", wintypes.DWORD),
    ]
#[repr(C)]
pub struct CSV_QUERY_MDS_PATH_V2 {
    pub Version: i64,
    pub RequiredSize: u32,
    pub MdsNodeId: u32,
    pub DsNodeId: u32,
    pub Flags: u32,
    pub DiskConnectivity: i32,
    pub VolumeId: GUID,
    pub IpAddressOffset: u32,
    pub IpAddressLength: u32,
    pub PathOffset: u32,
    pub PathLength: u32,
}
import "golang.org/x/sys/windows"

type CSV_QUERY_MDS_PATH_V2 struct {
	Version int64
	RequiredSize uint32
	MdsNodeId uint32
	DsNodeId uint32
	Flags uint32
	DiskConnectivity int32
	VolumeId windows.GUID
	IpAddressOffset uint32
	IpAddressLength uint32
	PathOffset uint32
	PathLength uint32
}
type
  CSV_QUERY_MDS_PATH_V2 = record
    Version: Int64;
    RequiredSize: DWORD;
    MdsNodeId: DWORD;
    DsNodeId: DWORD;
    Flags: DWORD;
    DiskConnectivity: Integer;
    VolumeId: TGUID;
    IpAddressOffset: DWORD;
    IpAddressLength: DWORD;
    PathOffset: DWORD;
    PathLength: DWORD;
  end;
const CSV_QUERY_MDS_PATH_V2 = extern struct {
    Version: i64,
    RequiredSize: u32,
    MdsNodeId: u32,
    DsNodeId: u32,
    Flags: u32,
    DiskConnectivity: i32,
    VolumeId: GUID,
    IpAddressOffset: u32,
    IpAddressLength: u32,
    PathOffset: u32,
    PathLength: u32,
};
type
  CSV_QUERY_MDS_PATH_V2 {.bycopy.} = object
    Version: int64
    RequiredSize: uint32
    MdsNodeId: uint32
    DsNodeId: uint32
    Flags: uint32
    DiskConnectivity: int32
    VolumeId: GUID
    IpAddressOffset: uint32
    IpAddressLength: uint32
    PathOffset: uint32
    PathLength: uint32
struct CSV_QUERY_MDS_PATH_V2
{
    long Version;
    uint RequiredSize;
    uint MdsNodeId;
    uint DsNodeId;
    uint Flags;
    int DiskConnectivity;
    GUID VolumeId;
    uint IpAddressOffset;
    uint IpAddressLength;
    uint PathOffset;
    uint PathLength;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CSV_QUERY_MDS_PATH_V2 サイズ: 64 バイト(x64)
dim st, 16    ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; Version : LONGLONG (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; RequiredSize : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; MdsNodeId : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; DsNodeId : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; Flags : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; DiskConnectivity : CSVFS_DISK_CONNECTIVITY (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; VolumeId : GUID (+28, 16byte)  varptr(st)+28 を基点に操作(16byte:入れ子/配列)
; IpAddressOffset : DWORD (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; IpAddressLength : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; PathOffset : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; PathLength : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (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 CSV_QUERY_MDS_PATH_V2
    #field int64 Version
    #field int RequiredSize
    #field int MdsNodeId
    #field int DsNodeId
    #field int Flags
    #field int DiskConnectivity
    #field GUID VolumeId
    #field int IpAddressOffset
    #field int IpAddressLength
    #field int PathOffset
    #field int PathLength
#endstruct

stdim st, CSV_QUERY_MDS_PATH_V2        ; NSTRUCT 変数を確保
st->Version = 100
mes "Version=" + st->Version