Autor Beitrag
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Do 05.01.06 17:01 
ich möchte eine Datei herunterladen, aber wenn ich solch einen Pfad habe

C:\DOKUME~1\Seth\LOKALE~1\Temp\ilchclan.zip

funktioniert das ganze nicht, muss ich das also in einen langen Pfad umwandeln ? Wenn ja, wie geht das ?

Danke
Jailbird
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 127

Windows XP Pro SP2
Delphi 7 Professional
BeitragVerfasst: Do 05.01.06 17:08 
Afaik mittel GetFullPathName
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Do 05.01.06 17:28 
habs hiermit gemacht und es funzt ;)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
Function GetSpecialFolder (aFolder: Integer): String;
var
  pIdL: PItemIDList;
  Path: Array [0..Max_Path] Of Char;
  Allocator: IMalloc;
Begin
  // ItemIdList für den Ordner holen
  SHGetSpecialFolderLocation (0, aFolder, pIdL);

  // ItemIdList in String umwandeln lassen
  SHGetPathFromIDList (pIDL, Path);

  // Speicher wieder freigeben
  If Succeeded (SHGetMalloc (Allocator)) Then
    Begin
      Allocator.Free (pIdL);
      {$IFDEF VER100}
      Allocator.Release;
      {$ENDIF}
    End;

  Result := Path;
End;