未分类--Windows API--GetSystemTime
2014-01-11 09:46
274 查看
原文来自MSDN Library for Visual Studio 2008 SP1,翻译部分仅为个人观点,想要看更多信息请看MSDN,如有版权问题请联系QQ 643166601,邮件643166601@qq.com
GetSystemTime Function
Retrieves the current system date and time.
检索当前系统日期和时间。
The system time is expressed in Coordinated Universal Time (UTC).
这个系统时间是以协调世界时(UTC)表示的。
To retrieve the current system date and time in local time, use the GetLocalTime function.
去检索当前系统本地的日期和时间,使用GetLocalTime函数。
Syntax
void WINAPI GetSystemTime(
__out LPSYSTEMTIME lpSystemTime
);
Parameters
lpSystemTime
A pointer to a SYSTEMTIME structure to receive the current system date and time.
指针值指向SYSTEMTIME结构体去接收当前系统的日期和时间。
The lpSystemTime parameter must not be NULL.
这个lpSystemTime参数必须不能是NULL。
Using NULL will result in an access violation.
使用NULL结果将导致访问中冲突。
Return Value
This function does not return a value or provide extended error information.
这个函数不返回一个值或提供错误扩展信息。
Remarks
To set the current system date and time, use the SetSystemTime function.
去设置当前系统日期和时间,使用SetSystemTime函数。
Example Code
For an example, see SYSTEMTIME.
Requirements
Client Requires Windows Vista, Windows XP, or Windows 2000 Professional.
Server Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.
Header Declared in Winbase.h; include Windows.h.
Library Use Kernel32.lib.
DLL Requires Kernel32.dll.
See Also
GetLocalTime
GetSystemTimeAdjustment
GetSystemTimeAsFileTime
SetSystemTime
System Time
SYSTEMTIME
Time Functions
Send comments about this topic to Microsoft
Build date: 4/24/2008
GetSystemTime Function
Retrieves the current system date and time.
检索当前系统日期和时间。
The system time is expressed in Coordinated Universal Time (UTC).
这个系统时间是以协调世界时(UTC)表示的。
To retrieve the current system date and time in local time, use the GetLocalTime function.
去检索当前系统本地的日期和时间,使用GetLocalTime函数。
Syntax
void WINAPI GetSystemTime(
__out LPSYSTEMTIME lpSystemTime
);
Parameters
lpSystemTime
A pointer to a SYSTEMTIME structure to receive the current system date and time.
指针值指向SYSTEMTIME结构体去接收当前系统的日期和时间。
The lpSystemTime parameter must not be NULL.
这个lpSystemTime参数必须不能是NULL。
Using NULL will result in an access violation.
使用NULL结果将导致访问中冲突。
Return Value
This function does not return a value or provide extended error information.
这个函数不返回一个值或提供错误扩展信息。
Remarks
To set the current system date and time, use the SetSystemTime function.
去设置当前系统日期和时间,使用SetSystemTime函数。
Example Code
For an example, see SYSTEMTIME.
Requirements
Client Requires Windows Vista, Windows XP, or Windows 2000 Professional.
Server Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.
Header Declared in Winbase.h; include Windows.h.
Library Use Kernel32.lib.
DLL Requires Kernel32.dll.
See Also
GetLocalTime
GetSystemTimeAdjustment
GetSystemTimeAsFileTime
SetSystemTime
System Time
SYSTEMTIME
Time Functions
Send comments about this topic to Microsoft
Build date: 4/24/2008
相关文章推荐
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数
- Windows API一日一练(70)GetSystemTime和GetLocalTime函数