#pragma code("kernel32.dll") | |
VOID GetLocalTime(SYSTEMTIME *lpst); | |
#pragma code(); | |
SYSTEMTIME zeit; | |
GetLocalTime(&zeit); | |
SetTagWord("varname",zeit.wYear); | |
SetTagWord("varname",zeit.wMonth); | |
SetTagWord("varname",zeit.wDayOfWeek); | |
SetTagWord("varname",zeit.wDay); | |
SetTagWord("varname",zeit.wHour); | |
SetTagWord("varname",zeit.wMinute); | |
SetTagWord("varname",zeit.wSecond); | |
SetTagWord("varname",zeit.wMilliseconds); |
#pragma code("kernel32.dll") | |
VOID GetLocalTime(SYSTEMTIME *lpst); | |
#pragma code(); | |
SYSTEMTIME zeit; | |
GetLocalTime(&zeit); | |
SetTagRaw("varname",(Byte*)&zeit,sizeof (SYSTEMTIME)); |
#pragma code("kernel32.dll") | |
BOOL SetLocalTime(SYSTEMTIME *lpst); | |
#pragma code(); | |
SYSTEMTIME zeit; | |
zeit.wYear=GetTagWord("varname"); | |
zeit.wMonth=GetTagWord("varname"); | |
zeit.wDayOfWeek=GetTagWord("varname"); | |
zeit.wDay=GetTagWord("varname"); | |
zeit.wHour=GetTagWord("varname"); | |
zeit.wMinute=GetTagWord("varname"); | |
zeit.wSecond=GetTagWord("varname"); | |
zeit.wMilliseconds=GetTagWord("varname"); | |
SetLocalTime(&zeit); |
#pragma code("kernel32.dll") | |
VOID SetLocalTime(SYSTEMTIME *lpst); | |
#pragma code(); | |
SYSTEMTIME zeit; | |
GetTagRaw("varname",(BYTE*)&zeit,sizeof (SYSTEMTIME)); | |
SetLocalTime(&zeit); |
欢迎光临 工控编程吧 (https://www.gkbc8.com/) | Powered by Discuz! X3.4 |