Ver Mensaje Individual
  #7  
Antiguo 25-03-2008
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Código Delphi [-]
function GetShortName(FileName: string): string;
var
 Actually: string;
 FindData: TWin32FindData;
 Pos, Count: Integer;
begin
 Count := 3;
 Result := UpCase(FileName[1]) + ':';
 while Count < Length(FileName) do
  begin
   Inc(Count);
   Pos := System.Pos('\', Copy(FileName, Count, MAX_PATH));
   if LongBool(Pos) then Inc(Count, Pos - 1) else Count := MAX_PATH;
   Windows.FindClose(FindFirstFile(PChar(Copy(FileName, 1, Count - 1)), FindData));
   if FindData.cAlternateFileName[0] <> #0 then
    Result := Result + '\' + FindData.cAlternateFileName
   else
    Result := Result + '\' + StrUpper(@FindData.cFileName);
  end;
end;

El problema ocurria cuando el nombre dado era un 8.3 válido, ahora debería funcionar. Las etiquetas son [delphi] tu codigo aquí [/delph¡] ó el único boton cafe de la parte superior del editor.

Saludos

Última edición por cHackAll fecha: 25-03-2008 a las 23:47:07.
Responder Con Cita