| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 
 | int main()
{
HANDLE hFind;
WIN32_FIND_DATA FindData;
 
 
// Début de la recherche
hFind=FindFirstFile ("*.*", &FindData);
if (hFind!=INVALID_HANDLE_VALUE)
{
// Si le fichier trouvé n'est pas un dossier mais bien un fichier, on affiche son nom
if (!(FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
MessageBox (NULL, FindData.cFileName, "Fichier", MB_ICONINFORMATION);
}
// Fichiers suivants
while (FindNextFile (hFind, &FindData))
{
if (!(FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
MessageBox (NULL, FindData.cFileName, "Fichier", MB_ICONINFORMATION);
}
}
}
// Fin de la recherche
FindClose (hFind);
 
return 0;
} | 
Partager