ホーム › System.RestartManager › RM_FILTER_INFO
RM_FILTER_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| FilterAction | RM_FILTER_ACTION | 4 | +0 | +0 | フィルターで指定する動作。RM_FILTER_ACTION列挙で表す。 |
| FilterTrigger | RM_FILTER_TRIGGER | 4 | +4 | +4 | フィルターのトリガー種別。RM_FILTER_TRIGGER列挙で表す。 |
| cbNextOffset | DWORD | 4 | +8 | +8 | 次のフィルター情報へのバイトオフセット。 |
| Anonymous | _Anonymous_e__Union | 16/12 | +16 | +12 | トリガー種別に応じてプロセスやファイルを保持する無名共用体。 |
共用体: _Anonymous_e__Union x64 16B / x86 12B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| strFilename | LPWSTR | 8/4 | +0 | +0 |
| Process | RM_UNIQUE_PROCESS | 12 | +0 | +0 |
| strServiceShortName | LPWSTR | 8/4 | +0 | +0 |
各言語での定義
#include <windows.h>
// RM_FILTER_INFO (x64 32 / x86 24 バイト)
typedef struct RM_FILTER_INFO {
RM_FILTER_ACTION FilterAction;
RM_FILTER_TRIGGER FilterTrigger;
DWORD cbNextOffset;
_Anonymous_e__Union Anonymous;
} RM_FILTER_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RM_FILTER_INFO
{
public int FilterAction;
public int FilterTrigger;
public uint cbNextOffset;
public _Anonymous_e__Union Anonymous;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RM_FILTER_INFO
Public FilterAction As Integer
Public FilterTrigger As Integer
Public cbNextOffset As UInteger
Public Anonymous As _Anonymous_e__Union
End Structureimport ctypes
from ctypes import wintypes
class RM_FILTER_INFO(ctypes.Structure):
_fields_ = [
("FilterAction", ctypes.c_int),
("FilterTrigger", ctypes.c_int),
("cbNextOffset", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
]#[repr(C)]
pub struct RM_FILTER_INFO {
pub FilterAction: i32,
pub FilterTrigger: i32,
pub cbNextOffset: u32,
pub Anonymous: _Anonymous_e__Union,
}import "golang.org/x/sys/windows"
type RM_FILTER_INFO struct {
FilterAction int32
FilterTrigger int32
cbNextOffset uint32
Anonymous _Anonymous_e__Union
}type
RM_FILTER_INFO = record
FilterAction: Integer;
FilterTrigger: Integer;
cbNextOffset: DWORD;
Anonymous: _Anonymous_e__Union;
end;const RM_FILTER_INFO = extern struct {
FilterAction: i32,
FilterTrigger: i32,
cbNextOffset: u32,
Anonymous: _Anonymous_e__Union,
};type
RM_FILTER_INFO {.bycopy.} = object
FilterAction: int32
FilterTrigger: int32
cbNextOffset: uint32
Anonymous: _Anonymous_e__Unionstruct RM_FILTER_INFO
{
int FilterAction;
int FilterTrigger;
uint cbNextOffset;
_Anonymous_e__Union Anonymous;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; RM_FILTER_INFO サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; FilterAction : RM_FILTER_ACTION (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; FilterTrigger : RM_FILTER_TRIGGER (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; cbNextOffset : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+12, 12byte) varptr(st)+12 を基点に操作(12byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RM_FILTER_INFO サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; FilterAction : RM_FILTER_ACTION (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; FilterTrigger : RM_FILTER_TRIGGER (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; cbNextOffset : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global RM_FILTER_INFO
#field int FilterAction
#field int FilterTrigger
#field int cbNextOffset
#field byte Anonymous 16
#endstruct
stdim st, RM_FILTER_INFO ; NSTRUCT 変数を確保
st->FilterAction = 100
mes "FilterAction=" + st->FilterAction
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。