EN
此内容没有您的语言版本,但有英语版本。

SystemTimeToFileTime function

Converts a system time to file time format. System time is based on Coordinated Universal Time (UTC).

Syntax


BOOL WINAPI SystemTimeToFileTime(
  _In_   const SYSTEMTIME *lpSystemTime,
  _Out_  LPFILETIME lpFileTime
);

Parameters

lpSystemTime [in]

A pointer to a SYSTEMTIME structure that contains the system time to be converted from UTC to file time format.

The wDayOfWeek member of the SYSTEMTIME structure is ignored.

lpFileTime [out]

A pointer to a FILETIME structure to receive the converted system time.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Examples

For an example, see Changing a File Time to the Current Time.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

DosDateTimeToFileTime
FILETIME
FileTimeToDosDateTime
FileTimeToSystemTime
System Time
SYSTEMTIME
Time Functions

 

 

社区附加资源

添加
显示:
© 2014 Microsoft