05-05-2017 02:47 AM
Hello
I want to know if my computer is currently connected to the Internet.
So I'm looking for several related functions. But I could not find it.
And I want to change the date/time on my computer. I have tried the following functions:
SetSystemDate();
SetSystemTime();
I changed it on my development PC. However, after making it as a distribution, it was not changed on the Panel PC.
The OS of the Panel PC is Windows 7 Embeded.
I want to know if there is another way to change the date and time.
Thank you.
05-05-2017 04:19 AM
Hi,
The SetSystemTime() should work on windows 7 embedded. It may be required to use EnableSetTime() first. Also make sure that the user has the privilege to change the computer time.
We use the following code snippet:
if(EnableSetTime())
{
// Change the computer time.
setTime=SetSystemTime(&newTime);
if (setTime)
{
// Tell all panels that time changed
SendMessage(HWND_BROADCAST, WM_TIMECHANGE,0,0);
DisableSetTime();
}
}
05-10-2017 04:40 AM
Hi.
Thank you for reply.
I tried the way you suggested. But I can not find the "EnableSetTime ()" function.
It is not defined anywhere.
I think user do not have the privilege to change the computer time.
I would like to know how to change the permissions on the Windows 7 Embedded OS so that the user can change the time.
Thank you very much.