如何修改系统时间!
我的代码如下:
SYSTEMTIME *SLT = new SYSTEMTIME;
SLT->wYear = (unsigned short)StrToInt(EditYear->Text);
SLT->wMonth = (unsigned short)StrToInt(EditMonth->Text);
SLT->wDay = (unsigned short)StrToInt(EditDay->Text);
SLT->wHour = (unsigned short)StrToInt(EditHour->Text);
SLT->wMinute = (unsigned short)StrToInt(EditMinute->Text);
SLT->wSecond = (unsigned short)StrToInt(EditSecond->Text);
SetLocalTime(SLT);
执行后,没有问题,可系统时间并没有被修改!