|
CoDosDateTimeToFileTime
Converts the MS-DOS representation of the time and date to a FILETIME structure, which Win32 uses to determine the date and time.
BOOL CoDosDateTimeToFileTime(
WORD nDosDate,
| //The 16-bit MS-DOS date
| WORD nDosTime,
| //The 16-bit MS-DOS time
| FILETIME * lpFileTime
| //Pointer to the FILETIME structure
| );
|
|
Parameters
nDosDate
Specifies the 16-bit MS-DOS date.
nDosTime
Specifies the 16-bit MS-DOS time.
lpFileTime
Points to the FILETIME structure.
Return Values
TRUE
Indicates the FILETIME structure was created successfully.
FALSE
Indicates the FILETIME structure was not created successfully, probably because of invalid arguments.
Comments
The FILETIME structure and the CoDosDateTimeToFileTime and CoFileTimeToDosDateTime functions are part of the Win32 API definition. They are provided for
compatibility in all OLE implementations, but are redundant on Win32 platforms.
MS-DOS records file dates and times as packed 16-bit values. An MS-DOS date
has the following format:
Bits
| Contents
| 0-4
| Days of the month (1-31).
| 5-8
| Months (1 = January, 2 = February, and so forth).
| 9-15
| Year offset from 1980 (add 1980 to get actual year).
|
An MS-DOS time has the following format:
Bits
| Contents
| 0-4
| Seconds divided by 2.
| 5-10
| Minutes (0-59).
| 11-15
| Hours (0-23 on a 24-hour clock).
|
See Also
CoFileTimeToDosDateTime, CoFileTimeNow
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|