以下是引用吹水佬在2023-4-21 12:37:17的发言:
最好不要用control.exe来调用shell32.dll的timedate功能,因control.exe是调用rundll32.exe来运行shell32.dll的timedate,否则获取rundll32.exe进程句柄有点麻烦。
DECLARE long CreateProcess IN kernel32 long,string,long,long,long,long,long,long,string@,string@
DECLARE long WaitForSingleObject IN kernel32 long,long
si = BINTOC(68,"4rs") + REPLICATE(0h00,64)
pi = REPLICATE(0h00,16)
CreateProcess(0,"rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,0",0,0,0,0,0,0,@si,@pi)
WaitForSingleObject(CTOBIN(LEFT(pi,4),"4rs"), -1)
? DATETIME()
最好不要用control.exe来调用shell32.dll的timedate功能,因control.exe是调用rundll32.exe来运行shell32.dll的timedate,否则获取rundll32.exe进程句柄有点麻烦。
DECLARE long CreateProcess IN kernel32 long,string,long,long,long,long,long,long,string@,string@
DECLARE long WaitForSingleObject IN kernel32 long,long
si = BINTOC(68,"4rs") + REPLICATE(0h00,64)
pi = REPLICATE(0h00,16)
CreateProcess(0,"rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,0",0,0,0,0,0,0,@si,@pi)
WaitForSingleObject(CTOBIN(LEFT(pi,4),"4rs"), -1)
? DATETIME()
十分感谢吹版,这段代码非常完美的解决了问题,虽然我这辈子都不可能读懂它了。