Trying to figure out WinAPI . You need to change the time for creating files in the folder to the current time, and then display the file names and date in the List Box . It was possible only to display the names of the files. Tried to change the date using SetFileTime() , but it does not change.
WIN32_FIND_DATA FindFileData; HANDLE hf = FindFirstFile("\\*", &FindFileData); do { // Если не директория if(!(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { // Вывод имени файла в ListBox SendDlgItemMessage( p->hDlg, IDC_LIST1, LB_ADDSTRING, NULL, (LPARAM)FindFileData.cFileName ); } } while(FindNextFile(hf,&FindFileData) != 0); FindClose(hf);
hfis not a file descriptor, hence the error. File descriptor returnsCreateFile- mega