ホーム › Storage.Nvme › NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG
NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| FeatureIdentifierSupported | NVME_FID_SUPPORTED_AND_EFFECTS | 1024 | +0 | +0 | Feature識別子ごとのサポート/効果情報の配列(256要素)。 |
各言語での定義
#include <windows.h>
// NVME_FID_SUPPORTED_AND_EFFECTS (x64 4 / x86 4 バイト)
typedef struct NVME_FID_SUPPORTED_AND_EFFECTS {
DWORD _bitfield;
} NVME_FID_SUPPORTED_AND_EFFECTS;
// NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG (x64 1024 / x86 1024 バイト)
typedef struct NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG {
NVME_FID_SUPPORTED_AND_EFFECTS FeatureIdentifierSupported[256];
} NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NVME_FID_SUPPORTED_AND_EFFECTS
{
public uint _bitfield;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public NVME_FID_SUPPORTED_AND_EFFECTS[] FeatureIdentifierSupported;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NVME_FID_SUPPORTED_AND_EFFECTS
Public _bitfield As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=256)> Public FeatureIdentifierSupported() As NVME_FID_SUPPORTED_AND_EFFECTS
End Structureimport ctypes
from ctypes import wintypes
class NVME_FID_SUPPORTED_AND_EFFECTS(ctypes.Structure):
_fields_ = [
("_bitfield", wintypes.DWORD),
]
class NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG(ctypes.Structure):
_fields_ = [
("FeatureIdentifierSupported", NVME_FID_SUPPORTED_AND_EFFECTS * 256),
]#[repr(C)]
pub struct NVME_FID_SUPPORTED_AND_EFFECTS {
pub _bitfield: u32,
}
#[repr(C)]
pub struct NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG {
pub FeatureIdentifierSupported: [NVME_FID_SUPPORTED_AND_EFFECTS; 256],
}import "golang.org/x/sys/windows"
type NVME_FID_SUPPORTED_AND_EFFECTS struct {
_bitfield uint32
}
type NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG struct {
FeatureIdentifierSupported [256]NVME_FID_SUPPORTED_AND_EFFECTS
}type
NVME_FID_SUPPORTED_AND_EFFECTS = record
_bitfield: DWORD;
end;
NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG = record
FeatureIdentifierSupported: array[0..255] of NVME_FID_SUPPORTED_AND_EFFECTS;
end;const NVME_FID_SUPPORTED_AND_EFFECTS = extern struct {
_bitfield: u32,
};
const NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG = extern struct {
FeatureIdentifierSupported: [256]NVME_FID_SUPPORTED_AND_EFFECTS,
};type
NVME_FID_SUPPORTED_AND_EFFECTS {.bycopy.} = object
_bitfield: uint32
NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG {.bycopy.} = object
FeatureIdentifierSupported: array[256, NVME_FID_SUPPORTED_AND_EFFECTS]struct NVME_FID_SUPPORTED_AND_EFFECTS
{
uint _bitfield;
}
struct NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG
{
NVME_FID_SUPPORTED_AND_EFFECTS[256] FeatureIdentifierSupported;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG サイズ: 1024 バイト(x64)
dim st, 256 ; 4byte整数×256(構造体サイズ 1024 / 4 切り上げ)
; FeatureIdentifierSupported : NVME_FID_SUPPORTED_AND_EFFECTS (+0, 1024byte) varptr(st)+0 を基点に操作(1024byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global NVME_FID_SUPPORTED_AND_EFFECTS
#field int _bitfield
#endstruct
#defstruct global NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG
#field NVME_FID_SUPPORTED_AND_EFFECTS FeatureIdentifierSupported 256
#endstruct
stdim st, NVME_FEATURE_IDENTIFIERS_EFFECTS_LOG ; NSTRUCT 変数を確保