Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <windows.h>
bool ChFileTimeCrtd(const char* fname, const SYSTEMTIME* pst)
{
HANDLE h;
FILETIME ft;
if (!pst || !SystemTimeToFileTime(pst,&ft))
return false;
h=CreateFile(fname,GENERIC_WRITE,FILE_SHARE_WRITE,
0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
if (h == INVALID_HANDLE_VALUE)
return false;
BOOL rc = SetFileTime(h,&ft,0,0);
CloseHandle(h);
return rc != FALSE;
}
int main(int argc, char* argv[])
{
SYSTEMTIME t;
t.wYear = 2001;
t.wMonth = 1;
t.wDay = 1;
t.wDayOfWeek = 0;
t.wHour = 17;
t.wMinute = 0;
t.wSecond = 0;
t.wMilliseconds = 0;
ChFileTimeCrtd("testfile.txt",&t);
return 0;
}