using system; using system.runtime.interopservices;
[structlayout(layoutkind.sequential)] public struct systemtime { public ushort wyear; public ushort wmonth; public ushort wdayofweek; public ushort wday; public ushort whour; public ushort wminute; public ushort wsecond; public ushort wmiliseconds; }
public class win32 { [dllimport("kernel32.dll")] public static extern bool setsystemtime( ref systemtime systime ); [dllimport("kernel32.dll")] public static extern void getsystemtime(ref systemtime systime); }
public class testpinvoke { public static void main() { systemtime systime =3d new systemtime();