ReactOS 0.4.15-dev-7918-g2a2556c
atltime.h
Go to the documentation of this file.
1// PROJECT: ReactOS ATL CTime, CFileTime, CTimeSpan, CFileTimeSpan
2// LICENSE: Public Domain
3// PURPOSE: Provides compatibility to Microsoft ATL
4// PROGRAMMERS: Benedikt Freisen
5
6#ifndef __ATLTIME_H__
7#define __ATLTIME_H__
8
9// WARNING: Untested code
10
11#pragma once
12
13#include <atlcore.h>
14#include <windows.h>
15#include <atlstr.h>
16#include <time.h>
17#include <oledb.h>
18
19namespace ATL
20{
21
23{
24 __time64_t m_nSpan;
25public:
26 CTimeSpan() noexcept
27 {
28 // leave uninitialized
29 }
30
31 CTimeSpan(__time64_t time) noexcept
32 {
33 m_nSpan = time;
34 }
35
36 CTimeSpan(LONG lDays, int nHours, int nMins, int nSecs) noexcept
37 {
38 ATLASSERT(lDays >= 0 && nHours >= 0 && nHours <= 23 && nMins >= 0 && nMins <= 59 && nSecs >= 0 && nSecs <= 59);
39 m_nSpan = ((((LONGLONG)lDays) * 24 + nHours) * 60 + nMins) * 60 + nSecs;
40 }
41
42 CString Format(LPCSTR pFormat) const
43 {
44 struct tm time;
45 _localtime64_s(&time, &m_nSpan);
46 CStringA strTime;
47 strftime(strTime.GetBuffer(256), 256, pFormat, &time);
48 strTime.ReleaseBuffer();
49 return CString(strTime);
50 }
51
52 CString Format(LPCTSTR pszFormat) const
53 {
54 struct tm time;
55 _localtime64_s(&time, &m_nSpan);
56 CString strTime;
57#ifdef UNICODE
58 wcsftime(strTime.GetBuffer(256), 256, pszFormat, &time);
59#else
60 strftime(strTime.GetBuffer(256), 256, pszFormat, &time);
61#endif
62 strTime.ReleaseBuffer();
63 return strTime;
64 }
65
66 CString Format(UINT nID) const
67 {
68 struct tm time;
69 _localtime64_s(&time, &m_nSpan);
70 CString strFormat;
71 strFormat.LoadString(nID);
72 CString strTime;
73#ifdef UNICODE
74 wcsftime(strTime.GetBuffer(256), 256, strFormat, &time);
75#else
76 strftime(strTime.GetBuffer(256), 256, strFormat, &time);
77#endif
78 strTime.ReleaseBuffer();
79 return strTime;
80 }
81
83 {
84 return m_nSpan / 60 / 60;
85 }
86
88 {
89 return m_nSpan / 60;
90 }
91
93 {
94 return m_nSpan;
95 }
96
98 {
99 return m_nSpan / 60 / 60 / 24;
100 }
101
102 LONG GetHours() const noexcept
103 {
104 return GetTotalHours() - GetDays() * 24;
105 }
106
108 {
109 return GetTotalMinutes() - GetTotalHours() * 60;
110 }
111
113 {
114 return GetTotalSeconds() - GetTotalMinutes() * 60;
115 }
116
117 __time64_t GetTimeSpan() const noexcept
118 {
119 return m_nSpan;
120 }
121
122// CArchive& Serialize64(CArchive& ar) // MFC only
123// {
124// // TODO
125// }
126
127};
128
129class CTime
130{
131 __time64_t m_nTime;
132public:
133 CTime() noexcept
134 {
135 // leave uninitialized
136 }
137
138 CTime(__time64_t time) noexcept
139 {
140 m_nTime = time;
141 }
142
143 CTime(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, int nDST = -1)
144 {
145 struct tm time;
146 time.tm_year = nYear;
147 time.tm_mon = nMonth;
148 time.tm_mday = nDay;
149 time.tm_hour = nHour;
150 time.tm_min = nMin;
151 time.tm_sec = nSec;
152 time.tm_isdst = nDST;
154 }
155
156 CTime(WORD wDosDate, WORD wDosTime, int nDST = -1)
157 {
158 FILETIME ft;
159 DosDateTimeToFileTime(wDosDate, wDosTime, &ft);
160 SYSTEMTIME st;
161 FileTimeToSystemTime(&ft, &st);
162 struct tm time;
163 time.tm_year = st.wYear;
164 time.tm_mon = st.wMonth;
165 time.tm_wday = st.wDayOfWeek;
166 time.tm_hour = st.wHour;
167 time.tm_min = st.wMinute;
168 time.tm_sec = st.wSecond;
169 time.tm_isdst = nDST;
171 }
172
173 CTime(const SYSTEMTIME& st, int nDST = -1) noexcept
174 {
175 struct tm time;
176 time.tm_year = st.wYear;
177 time.tm_mon = st.wMonth;
178 time.tm_wday = st.wDayOfWeek;
179 time.tm_hour = st.wHour;
180 time.tm_min = st.wMinute;
181 time.tm_sec = st.wSecond;
182 time.tm_isdst = nDST;
184 }
185
186 CTime(const FILETIME& ft, int nDST = -1)
187 {
188 SYSTEMTIME st;
189 FileTimeToSystemTime(&ft, &st);
190 struct tm time;
191 time.tm_year = st.wYear;
192 time.tm_mon = st.wMonth;
193 time.tm_wday = st.wDayOfWeek;
194 time.tm_hour = st.wHour;
195 time.tm_min = st.wMinute;
196 time.tm_sec = st.wSecond;
197 time.tm_isdst = nDST;
199 }
200
201 CTime(const DBTIMESTAMP& dbts, int nDST = -1) noexcept
202 {
203 struct tm time;
204 time.tm_year = dbts.year;
205 time.tm_mon = dbts.month;
206 time.tm_hour = dbts.hour;
207 time.tm_min = dbts.minute;
208 time.tm_sec = dbts.second;
209 time.tm_isdst = nDST;
211 }
212
213 CString Format(LPCTSTR pszFormat) const
214 {
215 struct tm time;
216 _localtime64_s(&time, &m_nTime);
217 CString strTime;
218#ifdef UNICODE
219 wcsftime(strTime.GetBuffer(256), 256, pszFormat, &time);
220#else
221 strftime(strTime.GetBuffer(256), 256, pszFormat, &time);
222#endif
223 strTime.ReleaseBuffer();
224 return strTime;
225 }
226
227 CString Format(UINT nFormatID) const
228 {
229 struct tm time;
230 _localtime64_s(&time, &m_nTime);
231 CString strFormat;
232 strFormat.LoadString(nFormatID);
233 CString strTime;
234#ifdef UNICODE
235 wcsftime(strTime.GetBuffer(256), 256, strFormat, &time);
236#else
237 strftime(strTime.GetBuffer(256), 256, strFormat, &time);
238#endif
239 strTime.ReleaseBuffer();
240 return strTime;
241 }
242
243 CString FormatGmt(LPCTSTR pszFormat) const
244 {
245 struct tm time;
247 CString strTime;
248#ifdef UNICODE
249 wcsftime(strTime.GetBuffer(256), 256, pszFormat, &time);
250#else
251 strftime(strTime.GetBuffer(256), 256, pszFormat, &time);
252#endif
253 strTime.ReleaseBuffer();
254 return strTime;
255 }
256
257 CString FormatGmt(UINT nFormatID) const
258 {
259 struct tm time;
261 CString strFormat;
262 strFormat.LoadString(nFormatID);
263 CString strTime;
264#ifdef UNICODE
265 wcsftime(strTime.GetBuffer(256), 256, strFormat, &time);
266#else
267 strftime(strTime.GetBuffer(256), 256, strFormat, &time);
268#endif
269 strTime.ReleaseBuffer();
270 return strTime;
271 }
272
273 bool GetAsDBTIMESTAMP(DBTIMESTAMP& dbts) const noexcept
274 {
275 struct tm time;
277 dbts.year = time.tm_year;
278 dbts.month = time.tm_mon;
279 dbts.day = time.tm_mday;
280 dbts.hour = time.tm_hour;
281 dbts.minute = time.tm_min;
282 dbts.second = time.tm_sec;
283 dbts.fraction = 0;
284 return true; // TODO: error handling?
285 }
286
287 bool GetAsSystemTime(SYSTEMTIME& st) const noexcept
288 {
289 struct tm time;
291 st.wYear = time.tm_year;
292 st.wMonth = time.tm_mon;
293 st.wDayOfWeek = time.tm_wday;
294 st.wDay = time.tm_mday;
295 st.wHour = time.tm_hour;
296 st.wMinute = time.tm_min;
297 st.wSecond = time.tm_sec;
298 st.wMilliseconds = 0;
299 return true; // TODO: error handling?
300 }
301
302 static CTime WINAPI GetCurrentTime() noexcept
303 {
304 __time64_t time;
305 _time64(&time);
306 return CTime(time);
307 }
308
309 int GetDay() const noexcept
310 {
311 struct tm time;
312 _localtime64_s(&time, &m_nTime);
313 return time.tm_mday;
314 }
315
316 int GetDayOfWeek() const noexcept
317 {
318 struct tm time;
319 _localtime64_s(&time, &m_nTime);
320 return time.tm_wday;
321 }
322
323 struct tm* GetGmtTm(struct tm* ptm) const
324 {
325 _gmtime64_s(ptm, &m_nTime);
326 return ptm;
327 }
328
329 int GetHour() const noexcept
330 {
331 struct tm time;
332 _localtime64_s(&time, &m_nTime);
333 return time.tm_hour;
334 }
335
336 struct tm* GetLocalTm(struct tm* ptm) const
337 {
338 _localtime64_s(ptm, &m_nTime);
339 return ptm;
340 }
341
342 int GetMinute() const noexcept
343 {
344 struct tm time;
345 _localtime64_s(&time, &m_nTime);
346 return time.tm_min;
347 }
348
349 int GetMonth() const noexcept
350 {
351 struct tm time;
352 _localtime64_s(&time, &m_nTime);
353 return time.tm_mon;
354 }
355
356 int GetSecond() const noexcept
357 {
358 struct tm time;
359 _localtime64_s(&time, &m_nTime);
360 return time.tm_sec;
361 }
362
363 __time64_t GetTime() const noexcept
364 {
365 return m_nTime;
366 }
367
369 {
370 struct tm time;
371 _localtime64_s(&time, &m_nTime);
372 return time.tm_year;
373 }
374
375// CArchive& Serialize64(CArchive& ar) // MFC only
376// {
377// // TODO
378// }
379
380 CTime operator+(CTimeSpan timeSpan) const noexcept
381 {
382 return CTime(m_nTime + timeSpan.GetTimeSpan());
383 }
384
385 CTime operator-(CTimeSpan timeSpan) const noexcept
386 {
387 return CTime(m_nTime - timeSpan.GetTimeSpan());
388 }
389
391 {
392 return CTimeSpan(m_nTime - time.GetTime());
393 }
394
396 {
397 m_nTime += span.GetTimeSpan();
398 return *this;
399 }
400
402 {
403 m_nTime -= span.GetTimeSpan();
404 return *this;
405 }
406
407 CTime& operator=(__time64_t time) noexcept
408 {
409 m_nTime = time;
410 return *this;
411 }
412
413 bool operator==(CTime time) const noexcept
414 {
415 return m_nTime == time.GetTime();
416 }
417
418 bool operator!=(CTime time) const noexcept
419 {
420 return m_nTime != time.GetTime();
421 }
422
423 bool operator<(CTime time) const noexcept
424 {
425 return m_nTime < time.GetTime();
426 }
427
428 bool operator>(CTime time) const noexcept
429 {
430 return m_nTime > time.GetTime();
431 }
432
433 bool operator<=(CTime time) const noexcept
434 {
435 return m_nTime <= time.GetTime();
436 }
437
438 bool operator>=(CTime time) const noexcept
439 {
440 return m_nTime >= time.GetTime();
441 }
442
443};
444
446{
448public:
449 CFileTimeSpan() noexcept
450 {
451 m_nSpan = 0;
452 }
453
455 {
456 m_nSpan = span.GetTimeSpan();
457 }
458
459 CFileTimeSpan(LONGLONG nSpan) noexcept
460 {
461 m_nSpan = nSpan;
462 }
463
465 {
466 return m_nSpan;
467 }
468
469 void SetTimeSpan(LONGLONG nSpan) noexcept
470 {
471 m_nSpan = nSpan;
472 }
473
475 {
476 return CFileTimeSpan(m_nSpan - span.GetTimeSpan());
477 }
478
479 bool operator!=(CFileTimeSpan span) const noexcept
480 {
481 return m_nSpan != span.GetTimeSpan();
482 }
483
485 {
486 return CFileTimeSpan(m_nSpan + span.GetTimeSpan());
487 }
488
490 {
491 m_nSpan += span.GetTimeSpan();
492 return *this;
493 }
494
495 bool operator<(CFileTimeSpan span) const noexcept
496 {
497 return m_nSpan < span.GetTimeSpan();
498 }
499
500 bool operator<=(CFileTimeSpan span) const noexcept
501 {
502 return m_nSpan <= span.GetTimeSpan();
503 }
504
506 {
507 m_nSpan = span.GetTimeSpan();
508 return *this;
509 }
510
512 {
513 m_nSpan -= span.GetTimeSpan();
514 return *this;
515 }
516
517 bool operator==(CFileTimeSpan span) const noexcept
518 {
519 return m_nSpan == span.GetTimeSpan();
520 }
521
522 bool operator>(CFileTimeSpan span) const noexcept
523 {
524 return m_nSpan > span.GetTimeSpan();
525 }
526
527 bool operator>=(CFileTimeSpan span) const noexcept
528 {
529 return m_nSpan >= span.GetTimeSpan();
530 }
531
532};
533
534class CFileTime : public FILETIME
535{
536public:
537 static const ULONGLONG Millisecond = 10000;
538 static const ULONGLONG Second = Millisecond * 1000;
539 static const ULONGLONG Minute = Second * 60;
540 static const ULONGLONG Hour = Minute * 60;
541 static const ULONGLONG Day = Hour * 24;
542 static const ULONGLONG Week = Day * 7;
543
544 CFileTime() noexcept
545 {
546 this->dwLowDateTime = 0;
547 this->dwHighDateTime = 0;
548 }
549
550 CFileTime(const FILETIME& ft) noexcept
551 {
552 this->dwLowDateTime = ft.dwLowDateTime;
553 this->dwHighDateTime = ft.dwHighDateTime;
554 }
555
556 CFileTime(ULONGLONG nTime) noexcept
557 {
558 this->dwLowDateTime = (DWORD) nTime;
559 this->dwHighDateTime = nTime >> 32;
560 }
561
562 static CFileTime GetCurrentTime() noexcept
563 {
564 FILETIME ft;
566 return CFileTime(ft);
567 }
568
570 {
571 return ((ULONGLONG)this->dwLowDateTime) | (((ULONGLONG)this->dwHighDateTime) << 32);
572 }
573
575 {
576 FILETIME ft;
577 LocalFileTimeToFileTime(this, &ft);
578 return CFileTime(ft);
579 }
580
581 void SetTime(ULONGLONG nTime) noexcept
582 {
583 this->dwLowDateTime = (DWORD) nTime;
584 this->dwHighDateTime = nTime >> 32;
585 }
586
588 {
589 FILETIME ft;
590 FileTimeToLocalFileTime(this, &ft);
591 return CFileTime(ft);
592 }
593
595 {
596 return CFileTime(this->GetTime() - span.GetTimeSpan());
597 }
598
600 {
601 return CFileTimeSpan(this->GetTime() - ft.GetTime());
602 }
603
604 bool operator!=(CFileTime ft) const noexcept
605 {
606 return this->GetTime() != ft.GetTime();
607 }
608
610 {
611 return CFileTime(this->GetTime() + span.GetTimeSpan());
612 }
613
615 {
616 this->SetTime(this->GetTime() + span.GetTimeSpan());
617 return *this;
618 }
619
620 bool operator<(CFileTime ft) const noexcept
621 {
622 return this->GetTime() < ft.GetTime();
623 }
624
625 bool operator<=(CFileTime ft) const noexcept
626 {
627 return this->GetTime() <= ft.GetTime();
628 }
629
630 CFileTime& operator=(const FILETIME& ft) noexcept
631 {
632 this->dwLowDateTime = ft.dwLowDateTime;
633 this->dwHighDateTime = ft.dwHighDateTime;
634 return *this;
635 }
636
638 {
639 this->SetTime(this->GetTime() - span.GetTimeSpan());
640 return *this;
641 }
642
643 bool operator==(CFileTime ft) const noexcept
644 {
645 return this->GetTime() == ft.GetTime();
646 }
647
648 bool operator>(CFileTime ft) const noexcept
649 {
650 return this->GetTime() > ft.GetTime();
651 }
652
653 bool operator>=(CFileTime ft) const noexcept
654 {
655 return this->GetTime() >= ft.GetTime();
656 }
657
658};
659
660} // namespace ATL
661
662#endif
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
void SetTimeSpan(LONGLONG nSpan) noexcept
Definition: atltime.h:469
bool operator>(CFileTimeSpan span) const noexcept
Definition: atltime.h:522
bool operator==(CFileTimeSpan span) const noexcept
Definition: atltime.h:517
CFileTimeSpan(LONGLONG nSpan) noexcept
Definition: atltime.h:459
CFileTimeSpan & operator=(const CFileTimeSpan &span) noexcept
Definition: atltime.h:505
CFileTimeSpan operator+(CFileTimeSpan span) const noexcept
Definition: atltime.h:484
CFileTimeSpan & operator-=(CFileTimeSpan span) noexcept
Definition: atltime.h:511
bool operator<(CFileTimeSpan span) const noexcept
Definition: atltime.h:495
bool operator<=(CFileTimeSpan span) const noexcept
Definition: atltime.h:500
CFileTimeSpan & operator+=(CFileTimeSpan span) noexcept
Definition: atltime.h:489
bool operator>=(CFileTimeSpan span) const noexcept
Definition: atltime.h:527
LONGLONG GetTimeSpan() const noexcept
Definition: atltime.h:464
LONGLONG m_nSpan
Definition: atltime.h:447
bool operator!=(CFileTimeSpan span) const noexcept
Definition: atltime.h:479
CFileTimeSpan() noexcept
Definition: atltime.h:449
CFileTimeSpan(const CFileTimeSpan &span) noexcept
Definition: atltime.h:454
CFileTimeSpan operator-(CFileTimeSpan span) const noexcept
Definition: atltime.h:474
bool operator<(CFileTime ft) const noexcept
Definition: atltime.h:620
bool operator<=(CFileTime ft) const noexcept
Definition: atltime.h:625
static const ULONGLONG Hour
Definition: atltime.h:540
CFileTime() noexcept
Definition: atltime.h:544
CFileTime UTCToLocal() const noexcept
Definition: atltime.h:587
void SetTime(ULONGLONG nTime) noexcept
Definition: atltime.h:581
static const ULONGLONG Second
Definition: atltime.h:538
CFileTimeSpan operator-(CFileTime ft) const noexcept
Definition: atltime.h:599
bool operator>(CFileTime ft) const noexcept
Definition: atltime.h:648
CFileTime(const FILETIME &ft) noexcept
Definition: atltime.h:550
CFileTime LocalToUTC() const noexcept
Definition: atltime.h:574
CFileTime & operator-=(CFileTimeSpan span) noexcept
Definition: atltime.h:637
bool operator==(CFileTime ft) const noexcept
Definition: atltime.h:643
static CFileTime GetCurrentTime() noexcept
Definition: atltime.h:562
CFileTime operator-(CFileTimeSpan span) const noexcept
Definition: atltime.h:594
static const ULONGLONG Minute
Definition: atltime.h:539
static const ULONGLONG Day
Definition: atltime.h:541
ULONGLONG GetTime() const noexcept
Definition: atltime.h:569
CFileTime & operator=(const FILETIME &ft) noexcept
Definition: atltime.h:630
bool operator!=(CFileTime ft) const noexcept
Definition: atltime.h:604
CFileTime operator+(CFileTimeSpan span) const noexcept
Definition: atltime.h:609
CFileTime & operator+=(CFileTimeSpan span) noexcept
Definition: atltime.h:614
CFileTime(ULONGLONG nTime) noexcept
Definition: atltime.h:556
bool operator>=(CFileTime ft) const noexcept
Definition: atltime.h:653
static const ULONGLONG Millisecond
Definition: atltime.h:537
static const ULONGLONG Week
Definition: atltime.h:542
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:639
CTimeSpan() noexcept
Definition: atltime.h:26
__time64_t m_nSpan
Definition: atltime.h:24
__time64_t GetTimeSpan() const noexcept
Definition: atltime.h:117
LONG GetMinutes() const noexcept
Definition: atltime.h:107
CString Format(UINT nID) const
Definition: atltime.h:66
LONG GetSeconds() const noexcept
Definition: atltime.h:112
LONGLONG GetTotalMinutes() const noexcept
Definition: atltime.h:87
CTimeSpan(__time64_t time) noexcept
Definition: atltime.h:31
LONGLONG GetTotalSeconds() const noexcept
Definition: atltime.h:92
CString Format(LPCTSTR pszFormat) const
Definition: atltime.h:52
CTimeSpan(LONG lDays, int nHours, int nMins, int nSecs) noexcept
Definition: atltime.h:36
LONGLONG GetDays() const noexcept
Definition: atltime.h:97
LONG GetHours() const noexcept
Definition: atltime.h:102
LONGLONG GetTotalHours() const noexcept
Definition: atltime.h:82
CString Format(LPCSTR pFormat) const
Definition: atltime.h:42
CTime(const DBTIMESTAMP &dbts, int nDST=-1) noexcept
Definition: atltime.h:201
bool operator!=(CTime time) const noexcept
Definition: atltime.h:418
struct tm * GetLocalTm(struct tm *ptm) const
Definition: atltime.h:336
CTimeSpan operator-(CTime time) const noexcept
Definition: atltime.h:390
CTime & operator+=(CTimeSpan span) noexcept
Definition: atltime.h:395
int GetYear()
Definition: atltime.h:368
__time64_t GetTime() const noexcept
Definition: atltime.h:363
CTime & operator=(__time64_t time) noexcept
Definition: atltime.h:407
CTime() noexcept
Definition: atltime.h:133
int GetDay() const noexcept
Definition: atltime.h:309
bool GetAsDBTIMESTAMP(DBTIMESTAMP &dbts) const noexcept
Definition: atltime.h:273
__time64_t m_nTime
Definition: atltime.h:131
bool operator<(CTime time) const noexcept
Definition: atltime.h:423
CTime(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, int nDST=-1)
Definition: atltime.h:143
bool operator<=(CTime time) const noexcept
Definition: atltime.h:433
int GetHour() const noexcept
Definition: atltime.h:329
CTime(const SYSTEMTIME &st, int nDST=-1) noexcept
Definition: atltime.h:173
bool operator>=(CTime time) const noexcept
Definition: atltime.h:438
struct tm * GetGmtTm(struct tm *ptm) const
Definition: atltime.h:323
int GetSecond() const noexcept
Definition: atltime.h:356
static CTime WINAPI GetCurrentTime() noexcept
Definition: atltime.h:302
CString FormatGmt(UINT nFormatID) const
Definition: atltime.h:257
int GetMonth() const noexcept
Definition: atltime.h:349
CTime(const FILETIME &ft, int nDST=-1)
Definition: atltime.h:186
CString Format(UINT nFormatID) const
Definition: atltime.h:227
CTime(WORD wDosDate, WORD wDosTime, int nDST=-1)
Definition: atltime.h:156
int GetMinute() const noexcept
Definition: atltime.h:342
CTime & operator-=(CTimeSpan span) noexcept
Definition: atltime.h:401
CString FormatGmt(LPCTSTR pszFormat) const
Definition: atltime.h:243
int GetDayOfWeek() const noexcept
Definition: atltime.h:316
bool operator==(CTime time) const noexcept
Definition: atltime.h:413
bool GetAsSystemTime(SYSTEMTIME &st) const noexcept
Definition: atltime.h:287
CTime operator+(CTimeSpan timeSpan) const noexcept
Definition: atltime.h:380
bool operator>(CTime time) const noexcept
Definition: atltime.h:428
CTime(__time64_t time) noexcept
Definition: atltime.h:138
CTime operator-(CTimeSpan timeSpan) const noexcept
Definition: atltime.h:385
CString Format(LPCTSTR pszFormat) const
Definition: atltime.h:213
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:128
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:188
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
Definition: time.c:221
BOOL WINAPI DosDateTimeToFileTime(IN WORD wFatDate, IN WORD wFatTime, OUT LPFILETIME lpFileTime)
Definition: time.c:75
BOOL WINAPI LocalFileTimeToFileTime(IN CONST FILETIME *lpLocalFileTime, OUT LPFILETIME lpFileTime)
Definition: time.c:253
unsigned short WORD
Definition: ntddk_ex.h:93
GLenum GLenum GLvoid GLvoid GLvoid * span
Definition: glext.h:5664
errno_t _gmtime64_s(struct tm *ptm, const __time64_t *ptime)
Definition: gmtime.c:122
__u16 time
Definition: mkdosfs.c:8
Definition: rosdlgs.h:6
CStringA CString
Definition: atlstr.h:139
unsigned int UINT
Definition: ndis.h:50
#define DWORD
Definition: nt_native.h:44
long LONG
Definition: pedump.c:60
__time64_t _mktime64(struct tm *ptm)
Definition: mktime.c:148
size_t CDECL strftime(char *str, size_t max, const char *format, const struct tm *mstm)
Definition: strftime.c:293
size_t CDECL wcsftime(wchar_t *str, size_t max, const wchar_t *format, const struct tm *mstm)
Definition: strftime.c:302
USHORT month
Definition: oledb.idl:45
SHORT year
Definition: oledb.idl:44
USHORT second
Definition: oledb.idl:49
USHORT hour
Definition: oledb.idl:47
USHORT minute
Definition: oledb.idl:48
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65
WORD wYear
Definition: winbase.h:905
WORD wMonth
Definition: winbase.h:906
WORD wHour
Definition: winbase.h:909
WORD wSecond
Definition: winbase.h:911
WORD wMinute
Definition: winbase.h:910
WORD wDayOfWeek
Definition: winbase.h:907
Definition: time.h:68
int64_t LONGLONG
Definition: typedefs.h:68
uint64_t ULONGLONG
Definition: typedefs.h:67
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define const
Definition: zconf.h:233