111,129
社区成员
发帖
与我相关
我的任务
分享
调用Win32的API,根据需要选用:
public class Win32
{
[DllImport("Kernel32.dll")]
public static extern bool SetSystemTime(ref SystemTime sysTime );
[DllImport("Kernel32.dll")]
public static extern bool SetLocalTime(ref SystemTime sysTime);
[DllImport("Kernel32.dll")]
public static extern void GetSystemTime(ref SystemTime sysTime);
[DllImport("Kernel32.dll")]
public static extern void GetLocalTime(ref SystemTime sysTime);
}