请输入您要查询的百科知识:

 

词条 SYSTEMTIME
释义

词义解释

system意为:系统 ;time意为:时间

systemtime笔者查了几个常用英语词典,并无此词解释。

win32的API函数

在Win32程序汇编中有SYSTEMTIME类数据结构。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;获取本地时间

invoke SetSystemTime,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);

Parameter

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 0x8000000000000000. 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.

Requirement

Windows 2000 Professional

Windows 2000 Server

Winbase.h (include Windows.h)

Kernel32.lib

Kernel32.dll

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/27 13:33:19