ホーム › System.Restore › RESTOREPOINTINFOA
RESTOREPOINTINFOA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwEventType | RESTOREPOINTINFO_EVENT_TYPE | 4 | +0 | +0 | 復元イベントの種別。RESTOREPOINTINFO_EVENT_TYPEで表す。 |
| dwRestorePtType | RESTOREPOINTINFO_TYPE | 4 | +4 | +4 | 復元ポイントの種別。RESTOREPOINTINFO_TYPEで表す。 |
| llSequenceNumber | LONGLONG | 8 | +8 | +8 | 復元ポイントのシーケンス番号。LONGLONGで表す。 |
| szDescription | CHAR | 64 | +16 | +16 | 復元ポイントの説明。ANSI(CHAR)の固定長バッファ。 |
各言語での定義
#include <windows.h>
// RESTOREPOINTINFOA (x64 80 / x86 80 バイト)
#pragma pack(push, 1)
typedef struct RESTOREPOINTINFOA {
RESTOREPOINTINFO_EVENT_TYPE dwEventType;
RESTOREPOINTINFO_TYPE dwRestorePtType;
LONGLONG llSequenceNumber;
CHAR szDescription[64];
} RESTOREPOINTINFOA;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct RESTOREPOINTINFOA
{
public uint dwEventType;
public uint dwRestorePtType;
public long llSequenceNumber;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public sbyte[] szDescription;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure RESTOREPOINTINFOA
Public dwEventType As UInteger
Public dwRestorePtType As UInteger
Public llSequenceNumber As Long
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=64)> Public szDescription() As SByte
End Structureimport ctypes
from ctypes import wintypes
class RESTOREPOINTINFOA(ctypes.Structure):
_pack_ = 1
_fields_ = [
("dwEventType", wintypes.DWORD),
("dwRestorePtType", wintypes.DWORD),
("llSequenceNumber", ctypes.c_longlong),
("szDescription", ctypes.c_byte * 64),
]#[repr(C, packed(1))]
pub struct RESTOREPOINTINFOA {
pub dwEventType: u32,
pub dwRestorePtType: u32,
pub llSequenceNumber: i64,
pub szDescription: [i8; 64],
}import "golang.org/x/sys/windows"
type RESTOREPOINTINFOA struct {
dwEventType uint32
dwRestorePtType uint32
llSequenceNumber int64
szDescription [64]int8
}type
RESTOREPOINTINFOA = packed record
dwEventType: DWORD;
dwRestorePtType: DWORD;
llSequenceNumber: Int64;
szDescription: array[0..63] of Shortint;
end;const RESTOREPOINTINFOA = extern struct {
dwEventType: u32,
dwRestorePtType: u32,
llSequenceNumber: i64,
szDescription: [64]i8,
};type
RESTOREPOINTINFOA {.packed.} = object
dwEventType: uint32
dwRestorePtType: uint32
llSequenceNumber: int64
szDescription: array[64, int8]align(1)
struct RESTOREPOINTINFOA
{
uint dwEventType;
uint dwRestorePtType;
long llSequenceNumber;
byte[64] szDescription;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RESTOREPOINTINFOA サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; dwEventType : RESTOREPOINTINFO_EVENT_TYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwRestorePtType : RESTOREPOINTINFO_TYPE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; llSequenceNumber : LONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; szDescription : CHAR (+16, 64byte) varptr(st)+16 を基点に操作(64byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global RESTOREPOINTINFOA, pack=1
#field int dwEventType
#field int dwRestorePtType
#field int64 llSequenceNumber
#field byte szDescription 64
#endstruct
stdim st, RESTOREPOINTINFOA ; NSTRUCT 変数を確保
st->dwEventType = 100
mes "dwEventType=" + st->dwEventType