2.
[StructLayout(LayoutKind.Sequential)]
public class SYSTEMTIME {
public Int16 wYear;
public Int16 wMonth;
public Int16 wDayOfWeek;
public Int16 wDay;
public Int16 wHour;
public Int16 wMinute;
public Int16 wSecond;
public Int16 wMilliseconds;
}
[DllImport("kernel32.dll")]
public static extern bool SetSystemTime([In,
MarshalAs(UnmanagedType.LPStruct)]SYSTEMTIME lpSystemTime);
[DllImport("kernel32.dll")]
public static extern void GetSystemTime([Out,
MarshalAs(UnmanagedType.LPStruct)]SYSTEMTIME lpSystemTime);