using System.ComponentModel;// Needed for control support using System.Timers; // Needed to support timer using System.Runtime.InteropServices;// Needed for StructLayout attribute
// Definition of WINAPI SYSTEMTIME structure [StructLayout(LayoutKind.Sequential)] public class SystemTime { public ushort wYear; public ushort wMonth; public ushort wDayOfWeek; public ushort wDay; public ushort wHour; public ushort wMinute; public ushort wSecond; public ushort wMilliseconds; }
// Definition of WINAPI GetLocalTime function[DllImport("Kernel32.dll")] public static extern void GetLocalTime(SystemTime st);