ホーム › Storage.InstallableFileSystems › INSTANCE_FULL_INFORMATION
INSTANCE_FULL_INFORMATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NextEntryOffset | DWORD | 4 | +0 | +0 | 次のエントリへのバイトオフセット。0なら最終エントリ。 |
| InstanceNameLength | WORD | 2 | +4 | +4 | インスタンス名のバイト長。 |
| InstanceNameBufferOffset | WORD | 2 | +6 | +6 | 構造体先頭からインスタンス名文字列までのバイトオフセット。 |
| AltitudeLength | WORD | 2 | +8 | +8 | アルティチュード文字列のバイト長。 |
| AltitudeBufferOffset | WORD | 2 | +10 | +10 | 構造体先頭からアルティチュード文字列までのバイトオフセット。 |
| VolumeNameLength | WORD | 2 | +12 | +12 | ボリューム名のバイト長。 |
| VolumeNameBufferOffset | WORD | 2 | +14 | +14 | 構造体先頭からボリューム名文字列までのバイトオフセット。 |
| FilterNameLength | WORD | 2 | +16 | +16 | フィルター名のバイト長。 |
| FilterNameBufferOffset | WORD | 2 | +18 | +18 | 構造体先頭からフィルター名文字列までのバイトオフセット。 |
各言語での定義
#include <windows.h>
// INSTANCE_FULL_INFORMATION (x64 20 / x86 20 バイト)
typedef struct INSTANCE_FULL_INFORMATION {
DWORD NextEntryOffset;
WORD InstanceNameLength;
WORD InstanceNameBufferOffset;
WORD AltitudeLength;
WORD AltitudeBufferOffset;
WORD VolumeNameLength;
WORD VolumeNameBufferOffset;
WORD FilterNameLength;
WORD FilterNameBufferOffset;
} INSTANCE_FULL_INFORMATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct INSTANCE_FULL_INFORMATION
{
public uint NextEntryOffset;
public ushort InstanceNameLength;
public ushort InstanceNameBufferOffset;
public ushort AltitudeLength;
public ushort AltitudeBufferOffset;
public ushort VolumeNameLength;
public ushort VolumeNameBufferOffset;
public ushort FilterNameLength;
public ushort FilterNameBufferOffset;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure INSTANCE_FULL_INFORMATION
Public NextEntryOffset As UInteger
Public InstanceNameLength As UShort
Public InstanceNameBufferOffset As UShort
Public AltitudeLength As UShort
Public AltitudeBufferOffset As UShort
Public VolumeNameLength As UShort
Public VolumeNameBufferOffset As UShort
Public FilterNameLength As UShort
Public FilterNameBufferOffset As UShort
End Structureimport ctypes
from ctypes import wintypes
class INSTANCE_FULL_INFORMATION(ctypes.Structure):
_fields_ = [
("NextEntryOffset", wintypes.DWORD),
("InstanceNameLength", ctypes.c_ushort),
("InstanceNameBufferOffset", ctypes.c_ushort),
("AltitudeLength", ctypes.c_ushort),
("AltitudeBufferOffset", ctypes.c_ushort),
("VolumeNameLength", ctypes.c_ushort),
("VolumeNameBufferOffset", ctypes.c_ushort),
("FilterNameLength", ctypes.c_ushort),
("FilterNameBufferOffset", ctypes.c_ushort),
]#[repr(C)]
pub struct INSTANCE_FULL_INFORMATION {
pub NextEntryOffset: u32,
pub InstanceNameLength: u16,
pub InstanceNameBufferOffset: u16,
pub AltitudeLength: u16,
pub AltitudeBufferOffset: u16,
pub VolumeNameLength: u16,
pub VolumeNameBufferOffset: u16,
pub FilterNameLength: u16,
pub FilterNameBufferOffset: u16,
}import "golang.org/x/sys/windows"
type INSTANCE_FULL_INFORMATION struct {
NextEntryOffset uint32
InstanceNameLength uint16
InstanceNameBufferOffset uint16
AltitudeLength uint16
AltitudeBufferOffset uint16
VolumeNameLength uint16
VolumeNameBufferOffset uint16
FilterNameLength uint16
FilterNameBufferOffset uint16
}type
INSTANCE_FULL_INFORMATION = record
NextEntryOffset: DWORD;
InstanceNameLength: Word;
InstanceNameBufferOffset: Word;
AltitudeLength: Word;
AltitudeBufferOffset: Word;
VolumeNameLength: Word;
VolumeNameBufferOffset: Word;
FilterNameLength: Word;
FilterNameBufferOffset: Word;
end;const INSTANCE_FULL_INFORMATION = extern struct {
NextEntryOffset: u32,
InstanceNameLength: u16,
InstanceNameBufferOffset: u16,
AltitudeLength: u16,
AltitudeBufferOffset: u16,
VolumeNameLength: u16,
VolumeNameBufferOffset: u16,
FilterNameLength: u16,
FilterNameBufferOffset: u16,
};type
INSTANCE_FULL_INFORMATION {.bycopy.} = object
NextEntryOffset: uint32
InstanceNameLength: uint16
InstanceNameBufferOffset: uint16
AltitudeLength: uint16
AltitudeBufferOffset: uint16
VolumeNameLength: uint16
VolumeNameBufferOffset: uint16
FilterNameLength: uint16
FilterNameBufferOffset: uint16struct INSTANCE_FULL_INFORMATION
{
uint NextEntryOffset;
ushort InstanceNameLength;
ushort InstanceNameBufferOffset;
ushort AltitudeLength;
ushort AltitudeBufferOffset;
ushort VolumeNameLength;
ushort VolumeNameBufferOffset;
ushort FilterNameLength;
ushort FilterNameBufferOffset;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; INSTANCE_FULL_INFORMATION サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; NextEntryOffset : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; InstanceNameLength : WORD (+4, 2byte) wpoke st,4,値 / 値 = wpeek(st,4)
; InstanceNameBufferOffset : WORD (+6, 2byte) wpoke st,6,値 / 値 = wpeek(st,6)
; AltitudeLength : WORD (+8, 2byte) wpoke st,8,値 / 値 = wpeek(st,8)
; AltitudeBufferOffset : WORD (+10, 2byte) wpoke st,10,値 / 値 = wpeek(st,10)
; VolumeNameLength : WORD (+12, 2byte) wpoke st,12,値 / 値 = wpeek(st,12)
; VolumeNameBufferOffset : WORD (+14, 2byte) wpoke st,14,値 / 値 = wpeek(st,14)
; FilterNameLength : WORD (+16, 2byte) wpoke st,16,値 / 値 = wpeek(st,16)
; FilterNameBufferOffset : WORD (+18, 2byte) wpoke st,18,値 / 値 = wpeek(st,18)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global INSTANCE_FULL_INFORMATION
#field int NextEntryOffset
#field short InstanceNameLength
#field short InstanceNameBufferOffset
#field short AltitudeLength
#field short AltitudeBufferOffset
#field short VolumeNameLength
#field short VolumeNameBufferOffset
#field short FilterNameLength
#field short FilterNameBufferOffset
#endstruct
stdim st, INSTANCE_FULL_INFORMATION ; NSTRUCT 変数を確保
st->NextEntryOffset = 100
mes "NextEntryOffset=" + st->NextEntryOffset