ホーム › System.Ioctl › REFS_SMR_VOLUME_GC_PARAMETERS
REFS_SMR_VOLUME_GC_PARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | DWORD | 4 | +0 | +0 | この構造体のバージョン番号。 |
| Flags | DWORD | 4 | +4 | +4 | ガベージコレクション動作を制御するフラグ。 |
| Action | REFS_SMR_VOLUME_GC_ACTION | 4 | +8 | +8 | GCに対して実行するアクション(開始/停止等)を示す列挙値。 |
| Method | REFS_SMR_VOLUME_GC_METHOD | 4 | +12 | +12 | 使用するGCの方式を示す列挙値。 |
| IoGranularity | DWORD | 4 | +16 | +16 | GCのI/O粒度(バイト)。 |
| CompressionFormat | DWORD | 4 | +20 | +20 | GC時に適用する圧縮形式。 |
| Unused | ULONGLONG | 64 | +24 | +24 | 未使用の予約領域。 |
各言語での定義
#include <windows.h>
// REFS_SMR_VOLUME_GC_PARAMETERS (x64 88 / x86 88 バイト)
typedef struct REFS_SMR_VOLUME_GC_PARAMETERS {
DWORD Version;
DWORD Flags;
REFS_SMR_VOLUME_GC_ACTION Action;
REFS_SMR_VOLUME_GC_METHOD Method;
DWORD IoGranularity;
DWORD CompressionFormat;
ULONGLONG Unused[8];
} REFS_SMR_VOLUME_GC_PARAMETERS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct REFS_SMR_VOLUME_GC_PARAMETERS
{
public uint Version;
public uint Flags;
public int Action;
public int Method;
public uint IoGranularity;
public uint CompressionFormat;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public ulong[] Unused;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure REFS_SMR_VOLUME_GC_PARAMETERS
Public Version As UInteger
Public Flags As UInteger
Public Action As Integer
Public Method As Integer
Public IoGranularity As UInteger
Public CompressionFormat As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public Unused() As ULong
End Structureimport ctypes
from ctypes import wintypes
class REFS_SMR_VOLUME_GC_PARAMETERS(ctypes.Structure):
_fields_ = [
("Version", wintypes.DWORD),
("Flags", wintypes.DWORD),
("Action", ctypes.c_int),
("Method", ctypes.c_int),
("IoGranularity", wintypes.DWORD),
("CompressionFormat", wintypes.DWORD),
("Unused", ctypes.c_ulonglong * 8),
]#[repr(C)]
pub struct REFS_SMR_VOLUME_GC_PARAMETERS {
pub Version: u32,
pub Flags: u32,
pub Action: i32,
pub Method: i32,
pub IoGranularity: u32,
pub CompressionFormat: u32,
pub Unused: [u64; 8],
}import "golang.org/x/sys/windows"
type REFS_SMR_VOLUME_GC_PARAMETERS struct {
Version uint32
Flags uint32
Action int32
Method int32
IoGranularity uint32
CompressionFormat uint32
Unused [8]uint64
}type
REFS_SMR_VOLUME_GC_PARAMETERS = record
Version: DWORD;
Flags: DWORD;
Action: Integer;
Method: Integer;
IoGranularity: DWORD;
CompressionFormat: DWORD;
Unused: array[0..7] of UInt64;
end;const REFS_SMR_VOLUME_GC_PARAMETERS = extern struct {
Version: u32,
Flags: u32,
Action: i32,
Method: i32,
IoGranularity: u32,
CompressionFormat: u32,
Unused: [8]u64,
};type
REFS_SMR_VOLUME_GC_PARAMETERS {.bycopy.} = object
Version: uint32
Flags: uint32
Action: int32
Method: int32
IoGranularity: uint32
CompressionFormat: uint32
Unused: array[8, uint64]struct REFS_SMR_VOLUME_GC_PARAMETERS
{
uint Version;
uint Flags;
int Action;
int Method;
uint IoGranularity;
uint CompressionFormat;
ulong[8] Unused;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; REFS_SMR_VOLUME_GC_PARAMETERS サイズ: 88 バイト(x64)
dim st, 22 ; 4byte整数×22(構造体サイズ 88 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Flags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Action : REFS_SMR_VOLUME_GC_ACTION (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Method : REFS_SMR_VOLUME_GC_METHOD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; IoGranularity : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; CompressionFormat : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Unused : ULONGLONG (+24, 64byte) varptr(st)+24 を基点に操作(64byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global REFS_SMR_VOLUME_GC_PARAMETERS
#field int Version
#field int Flags
#field int Action
#field int Method
#field int IoGranularity
#field int CompressionFormat
#field int64 Unused 8
#endstruct
stdim st, REFS_SMR_VOLUME_GC_PARAMETERS ; NSTRUCT 変数を確保
st->Version = 100
mes "Version=" + st->Version