ホーム › System.Restore › RESTOREPOINTINFOA
RESTOREPOINTINFOA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| dwEventType | RESTOREPOINTINFO_EVENT_TYPE | 4 | +0 | +0 | イベントの種類。このメンバーには、次のいずれかの値を指定できます。
| ||||||||||||
| dwRestorePtType | RESTOREPOINTINFO_TYPE | 4 | +4 | +4 | 復元ポイントの種類。このメンバーには、次のいずれかの値を指定できます。
| ||||||||||||
| llSequenceNumber | LONGLONG | 8 | +8 | +8 | 復元ポイントのシーケンス番号。システム変更を終了するには、直前の SRSetRestorePoint の呼び出しが返したシーケンス番号を設定します。 | ||||||||||||
| szDescription | CHAR | 64 | +16 | +16 | ユーザーが復元ポイントを容易に識別できるように表示される説明。ANSI 文字列の最大長は MAX_DESC です。Unicode 文字列の最大長は MAX_DESC_W です。詳細については、 Restore Point Description Text を参照してください。 |
公式ドキュメント
SRSetRestorePoint 関数で使用される情報を格納します。
解説(Remarks)
メモ
srrestoreptapi.h ヘッダーは、UNICODE プリプロセッサ定数の定義に基づいて、この関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして RESTOREPOINTINFO を定義します。エンコーディングに中立なエイリアスと、エンコーディングに中立でないコードを混在させて使用すると、不一致が生じ、コンパイル エラーや実行時エラーの原因となることがあります。詳細については、Conventions for Function Prototypes を参照してください。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#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