struct _utimbuf filetime ;
CTime t( 1999, 3, 19, 22, 15, 0 );
time_t osBinaryTime = t.GetTime();
printf( "time_t = %ld\n", osBinaryTime ); filetime.actime = osBinaryTime;
filetime.modtime = osBinaryTime;
int hFile = _open(LPCTSTR(m_strPath), _O_RDWR);
if( _futime( hFile, &filetime ) == -1 )
perror( "_futime failed\n" );
else
printf( "File time modified\n" );
close (hFile);
CTime t( 1999, 3, 19, 22, 15, 0 );
time_t osBinaryTime = t.GetTime();
printf( "time_t = %ld\n", osBinaryTime ); filetime.actime = osBinaryTime;
filetime.modtime = osBinaryTime;
int hFile = _open(LPCTSTR(m_strPath), _O_RDWR);
if( _futime( hFile, &filetime ) == -1 )
perror( "_futime failed\n" );
else
printf( "File time modified\n" );
close (hFile);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货