Citation:
If the function succeeds, the return value is the length, in TCHARs, of the string copied to lpBuffer, not including the terminating null character. If the return value is greater than nBufferLength, the return value is the length, in TCHARs, of the buffer required to hold the path.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Si tu veux afficher le chemin du répertoire ce n'est pas la valeur retournée par la fonction qui t'intéresse mais TempName.