public static void MainForTest() { mainForCinterface(); MySystemTime sysTime = new MySystemTime(); Win32API.GetSystemTime(sysTime); string dt; dt = "System time is: \n" + "Year: " + sysTime.wYear + "\n" + "Month: " + sysTime.wMonth + "\n" + "DayOfWeek: " + sysTime.wDayOfWeek + "\n" + "Day: " + sysTime.wDay; Win32API.MessageBox(IntPtr.Zero, dt, "Platform Invoke Sample", 0); Rect rect = new Rect(); rect.bottom = 30; rect.right = 30; Win32API.PtInRect(ref rect, new Point()); }
public static extern void GetSystemTime(MySystemTime st);