ホーム › Storage.EnhancedStorage › SILO_INFO
SILO_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ulSTID | DWORD | 4 | +0 | +0 | ストレージ機能の種別を識別するサイロ種別ID。 |
| SpecificationMajor | BYTE | 1 | +4 | +4 | サイロが準拠する仕様のメジャーバージョン番号。 |
| SpecificationMinor | BYTE | 1 | +5 | +5 | サイロが準拠する仕様のマイナーバージョン番号。 |
| ImplementationMajor | BYTE | 1 | +6 | +6 | サイロ実装のメジャーバージョン番号。 |
| ImplementationMinor | BYTE | 1 | +7 | +7 | サイロ実装のマイナーバージョン番号。 |
| type | BYTE | 1 | +8 | +8 | サイロの種類を示す値。 |
| capabilities | BYTE | 1 | +9 | +9 | サイロが備える機能を示すビットフラグ。 |
各言語での定義
#include <windows.h>
// SILO_INFO (x64 12 / x86 12 バイト)
typedef struct SILO_INFO {
DWORD ulSTID;
BYTE SpecificationMajor;
BYTE SpecificationMinor;
BYTE ImplementationMajor;
BYTE ImplementationMinor;
BYTE type;
BYTE capabilities;
} SILO_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SILO_INFO
{
public uint ulSTID;
public byte SpecificationMajor;
public byte SpecificationMinor;
public byte ImplementationMajor;
public byte ImplementationMinor;
public byte type;
public byte capabilities;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SILO_INFO
Public ulSTID As UInteger
Public SpecificationMajor As Byte
Public SpecificationMinor As Byte
Public ImplementationMajor As Byte
Public ImplementationMinor As Byte
Public type As Byte
Public capabilities As Byte
End Structureimport ctypes
from ctypes import wintypes
class SILO_INFO(ctypes.Structure):
_fields_ = [
("ulSTID", wintypes.DWORD),
("SpecificationMajor", ctypes.c_ubyte),
("SpecificationMinor", ctypes.c_ubyte),
("ImplementationMajor", ctypes.c_ubyte),
("ImplementationMinor", ctypes.c_ubyte),
("type", ctypes.c_ubyte),
("capabilities", ctypes.c_ubyte),
]#[repr(C)]
pub struct SILO_INFO {
pub ulSTID: u32,
pub SpecificationMajor: u8,
pub SpecificationMinor: u8,
pub ImplementationMajor: u8,
pub ImplementationMinor: u8,
pub type: u8,
pub capabilities: u8,
}import "golang.org/x/sys/windows"
type SILO_INFO struct {
ulSTID uint32
SpecificationMajor byte
SpecificationMinor byte
ImplementationMajor byte
ImplementationMinor byte
type byte
capabilities byte
}type
SILO_INFO = record
ulSTID: DWORD;
SpecificationMajor: Byte;
SpecificationMinor: Byte;
ImplementationMajor: Byte;
ImplementationMinor: Byte;
type: Byte;
capabilities: Byte;
end;const SILO_INFO = extern struct {
ulSTID: u32,
SpecificationMajor: u8,
SpecificationMinor: u8,
ImplementationMajor: u8,
ImplementationMinor: u8,
type: u8,
capabilities: u8,
};type
SILO_INFO {.bycopy.} = object
ulSTID: uint32
SpecificationMajor: uint8
SpecificationMinor: uint8
ImplementationMajor: uint8
ImplementationMinor: uint8
type: uint8
capabilities: uint8struct SILO_INFO
{
uint ulSTID;
ubyte SpecificationMajor;
ubyte SpecificationMinor;
ubyte ImplementationMajor;
ubyte ImplementationMinor;
ubyte type;
ubyte capabilities;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SILO_INFO サイズ: 12 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; ulSTID : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; SpecificationMajor : BYTE (+4, 1byte) poke st,4,値 / 値 = peek(st,4)
; SpecificationMinor : BYTE (+5, 1byte) poke st,5,値 / 値 = peek(st,5)
; ImplementationMajor : BYTE (+6, 1byte) poke st,6,値 / 値 = peek(st,6)
; ImplementationMinor : BYTE (+7, 1byte) poke st,7,値 / 値 = peek(st,7)
; type : BYTE (+8, 1byte) poke st,8,値 / 値 = peek(st,8)
; capabilities : BYTE (+9, 1byte) poke st,9,値 / 値 = peek(st,9)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SILO_INFO
#field int ulSTID
#field byte SpecificationMajor
#field byte SpecificationMinor
#field byte ImplementationMajor
#field byte ImplementationMinor
#field byte type
#field byte capabilities
#endstruct
stdim st, SILO_INFO ; NSTRUCT 変数を確保
st->ulSTID = 100
mes "ulSTID=" + st->ulSTID