我正在尝试创建一个显示Windows操作系统上次备份时间和日期的WPF应用程序。我尝试使用EventLogger
,但我找不到详细信息。有没有办法让Windows上次备份时间和日期?
答案 0 :(得分:2)
您正在寻找Environment Class
提供有关当前的信息和操作方法 环境和平台。这个类不能被继承。
修改强>
您还可以查看:Creating System Restore Points using PInvoke
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RestorePointInfo
{
public int dwEventType; // The type of event
public int dwRestorePtType; // The type of restore point
public Int64 llSequenceNumber; // The sequence number of the restore point
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxDescW + 1)]
public string szDescription; // The description to be displayed so
//the user can easily identify a restore point
}