Beispiel #1
0
        public static void MainForTest()
        {
            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());
        }
Beispiel #2
0
 public static extern void GetSystemTime(MySystemTime st);