cs_ageof
Messages postés7Date d'inscriptiondimanche 12 novembre 2000StatutMembreDernière intervention26 mai 2005
-
26 mai 2005 à 16:50
ymca2003
Messages postés2070Date d'inscriptionmardi 22 avril 2003StatutMembreDernière intervention 3 juillet 2006
-
26 mai 2005 à 18:12
Bonjour,
Pour un fichier donné, je souhaite obtenir son nom Dos.
// Rechercher donnée fichier
ret = FindFirstFile(pfile , pDataFic);
// Si fichier trouver
if (ret != INVALID_HANDLE_VALUE)
{
// Dans l'objet pDataFic->cAlternatFileName y'a le nom avec les ~
}
// Fermer recherche
FindClose(ret);
MetalDwarf
Messages postés241Date d'inscriptionmardi 29 octobre 2002StatutMembreDernière intervention23 janvier 2006 26 mai 2005 à 17:41
si le nom fait moins de 8 lettres (+3 d'extension), alors c est celui
ci en majuscules (de toute facon MS-DOS n est pas sensible a la casse),
sinon c est les 6 premieres lettre, et ensuite ~x, avec x le numero du
fichier (en general, 1).
When an application calls this function and specifies a path on a volume that does not support 8.3 aliases, the function fails with ERROR_INVALID_PARAMETER if the path is longer than 67 bytes.
The path specified by lpszLongPath does not have to be a fully qualified path or a long path. The short form may be longer than the specifed path.
If the specified path is already in its short form, there is no need for any conversion, and the function simply copies the specified path to the buffer for the short path.
You can set lpszShortPath to the same value as lpszLongPath; in other words, you can set the buffer for the short path to the address of the input path string.
You can obtain the long name of a file from the short name by calling the FindFirstFile function.