zoukankan      html  css  js  c++  java
  • c# 编程修改 wince 系统时间

            [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 wMilliseconds;
            }
            [DllImport("coredll.dll")]
            private static extern bool SetLocalTime(ref SYSTEMTIME lpSystemTime);
            [DllImport("coredll.dll")]
            private static extern bool GetLocalTime(ref SYSTEMTIME lpSystemTime);     
    
                SYSTEMTIME lpTime =  new SYSTEMTIME (); 
                lpTime.wYear =  Convert.ToUInt16(N.Text); 
                lpTime.wMonth = Convert.ToUInt16(Y.Text); 
                lpTime.wDay = Convert.ToUInt16(R.Text); 
                lpTime.wHour = Convert.ToUInt16(S.Text); 
                lpTime.wMinute = Convert.ToUInt16(F.Text); 
                lpTime.wSecond = Convert.ToUInt16(M.Text);
                SetLocalTime(ref lpTime);
    

      

  • 相关阅读:
    10
    9
    8
    第七章
    第五章
    第六章
    android深度探索第四章
    android深度探索第三章
    android深度探索第二章
    android深度探索第一章
  • 原文地址:https://www.cnblogs.com/FuYan/p/4233077.html
Copyright © 2011-2022 走看看