Дипломная работа: Розробка програмного забезпечення файлового менеджера
while(1)
{
pfiles =(_FILES*) malloc(sizeof(FILES));
if(!pfirst)pfirst = pfiles;
pfiles->attrib = fd.dwFileAttributes;
pfiles->filesize = fd.nFileSizeLow;
pfiles->ansiname =(char*) malloc(strlen((const char*)&fd.cFileName)+1);
if(ppred)ppred->next = pfiles;
wsprintf(pfiles->ansiname,(const char*)&fd.cFileName);
ppred = pfiles;
if(!FindNextFile(hFind, &fd))
if(GetLastError() == ERROR_NO_MORE_FILES)
break;
}
pfiles->next = NULL;
FindClose(hFind);
files = pfirst;
Form1->APrintFileListExecute(0);
return 1;
}
int NTFSReadDir2(PLOGICAL_DISC pld, char* pPath)
{
char pFullPath[1024];
HANDLE hFind;
WIN32_FIND_DATA fd;
PFILES pfirst = NULL, pfiles, ppred = NULL;
if(!pld)return 0;
pFullPath[0] = pld->nDisc;
pFullPath[1] = ':';