示例#1
0
 private TIME_FIELDS SYSTEMTIME_To_TIME_FIELDS(_SYSTEMTIME st)
 {
     return(new TIME_FIELDS
     {
         Year = st.wYear,
         Month = st.wMonth,
         Day = st.wDay,
         Hour = st.wHour,
         Minute = st.wMinute,
         Second = st.wSecond,
         Milliseconds = st.wMilliseconds,
         Weekday = st.wDayOfWeek
     });
 }
        private _SYSTEMTIME createSystemTime(DateTime dateTime)
        {
            var systemTime = new _SYSTEMTIME()
            {
                wYear         = (ushort)dateTime.Year,
                wMonth        = (ushort)dateTime.Month,
                wDay          = (ushort)dateTime.Day,
                wHour         = (ushort)dateTime.Hour,
                wMinute       = (ushort)dateTime.Minute,
                wSecond       = (ushort)dateTime.Second,
                wMilliseconds = (ushort)dateTime.Millisecond,
            };

            return(systemTime);
        }
示例#3
0
 public static extern bool FileTimeToSystemTime(ref _FILETIME lpFileTime, out _SYSTEMTIME lpSystemTime);
示例#4
0
 public static extern Boolean FileTimeToSystemTime([In] ref System.Runtime.InteropServices.ComTypes.FILETIME lpFileTime, out _SYSTEMTIME lpSystemTime);