SYSTEMTIME 百科内容来自于: 百度百科

win32的API函数

SYSTEMTIME结构定义如下:
SYSTEMTIME STRUCT
{
WORD wYear ; 年
WORD wMonth ;月
WORD wDayOfWeek ;星期,0=星期日,1=星期一...
WORD wDay ;日
WORD wHour ;时
WORD wMinute ;分
WORD wSecond ;秒
WORD wMilliseconds ;毫秒
}SYSTEMTIME ENDS
结构中的字段全为word类型,而Win32程序中用的往往是dword型变量,所以在使用这些数据之前往往要先把它们转换为dword类型,用movzx指令就可以实现。
在SYSTEMTIME数据结构里,日期和时间都被编码了.月份是从1月开始的(一月份就是1月)。周日是从0开始的(星期天是0).wDay是在当前月份下的日期,也是从1开始的。
与获取系统时间的函数相对应,可以用下面的两个函数设置系统时间:
invoke SetLocalTime,lpSystemTime;获取本地时间
invokeSetSystemTime,lpSystemTime;获取格林威治标准时间
参考资料:《Windows环境下32位汇编语言程序设计》

MSDN中的解释

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

Syntax

BOOL WINAPI FileTimeToSystemTime( __in const FILETIME *lpFileTime, __out LPSYSTEMTIME lpSystemTime);

Parameters

lpFileTime [in]A pointer to a FILETIME structure containing the file time to be converted to system (UTC) date and time format. This value must be less than 0. Otherwise, the function fails.  lpSystemTime [out]A pointer to a SYSTEMTIME structure to receive the converted file 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.

Requirements

Windows 2000 Professional
Windows 2000 Server
Winbase.h (include Windows.h)
Kernel32.lib
Kernel32.dll
$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定