LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing a Pcs date and time

Can anyone tell me which Windows dll is used to change the date and
time.
0 Kudos
Message 1 of 5
(3,093 Views)
DLL Name: KERNEL32.DLL
Function Name: SetLocalTime

You need to pass a pointer 2 SAMETIME struct to the DLL. See windows.h or MSDN for more details.

BOOL SetLocalTime(CONST SYSTEMTIME *lpSystemTime);


A Rafiq
National Instruments
0 Kudos
Message 2 of 5
(3,093 Views)
Just to clear the confusion, this function sets both date AND time. Although doesn't seem from the func name.

A Rafiq
0 Kudos
Message 3 of 5
(3,093 Views)
attached is a vi that calls the settime function and notifies the desktop that the time has changed.
Stu
0 Kudos
Message 4 of 5
(3,093 Views)
Kernel32.dll

The function is long SetSystemTime(void *lpSystemTime);

You can pass it a cluster of I16 in order, year, month, day, hour, min, sec

Mike

> Can anyone tell me which Windows dll is used to change the date and
> time.
0 Kudos
Message 5 of 5
(3,093 Views)