修改系统时间函数 BOOL SetSystemTime( CONST SYSTEMTIME *lpSystemTime // address of system time to set ); 时间结构体定义 typedef struct _SYSTEMTIME { // st WORD wYear; WORD wMonth; WORD wDayOfWeek; WORD wDay; WORD wHour; WORD wMinute; WORD wSecond; WORD wMilliseconds; } SYSTEMTIME; 得到系统时间函数 VOID GetSystemTime( LPSYSTEMTIME lpSystemTime // address of system time structure );
调用API函数: BOOL SetSystemTime( CONST SYSTEMTIME *lpSystemTime // address of system time to set ); ///////以下代码把系统小时数设为20, ... SYSTEMTIME SystemTime; GetSystemTime(&SystemTime); SystemTime.wHour = 20; SetSystemTime(&SystemTime); ...
BOOL SetSystemTime(
CONST SYSTEMTIME *lpSystemTime // address of system time to set
);
时间结构体定义
typedef struct _SYSTEMTIME { // st
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;
得到系统时间函数
VOID GetSystemTime(
LPSYSTEMTIME lpSystemTime // address of system time structure
);
BOOL SetSystemTime(
CONST SYSTEMTIME *lpSystemTime // address of system time to set
);
///////以下代码把系统小时数设为20,
...
SYSTEMTIME SystemTime;
GetSystemTime(&SystemTime);
SystemTime.wHour = 20;
SetSystemTime(&SystemTime);
...