SystemTimeToFileTime

  BOOL SystemTimeToFileTime(lpst, lpft)    
  LPSYSTEMTIME lpst; /* address of system time to convert */
  LPFILETIME lpft; /* address of buffer for converted file time */

The SystemTimeToFileTime function converts a SYSTEMTIME time value into a FILETIME.

Parameters

lpst

Points to a SYSTEMTIME structure that contains the time to be converted. The SYSTEMTIME structure has the following form:

typedef struct _SYSTEMTIME { /* st */

WORD wYear;

WORD wMonth;

WORD wDayOfWeek;

WORD wDay;

WORD wHour;

WORD wMinute;

WORD wSecond;

WORD wMilliseconds;

} SYSTEMTIME;

typedef SYSTEMTIME *PSYSTEMTIME, *LPSYSTEMTIME;

The wDayOfWeek field is ignored.

lpft

Points to a FILETIME structure that receives the converted SYSTEMTIME. The FILETIME structure has the following form:

typedef struct _FILETIME { /* ft */

DWORD dwLowDateTime; /* low 32 bits */

DWORD dwHighDateTime; /* high 32-bits */

} FILETIME, *PFILETIME, *LPFILETIME;

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

See Also

FileTimeToSystemTime, FileTimeToDosDateTime, DosDateTimeToFileTime