Einzelnen Beitrag anzeigen

Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#1

SHGetSpecialFolderLocation unter Vista

  Alt 5. Jun 2009, 21:34
Ich benutze folgende Funktion, um Systemordner zu ermitteln:
Delphi-Quellcode:
function GetShellFolder(CSIDL: integer): string;
var
  pidl : PItemIdList;
  FolderPath : string;
  SystemFolder : Integer;
begin
  FolderPath := '';
  SystemFolder := CSIDL;
  if SUCCEEDED(SHGetSpecialFolderLocation(0, SystemFolder, pidl)) then
  begin
    SetLength(FolderPath, MAX_PATH);
    SHGetPathFromIDList(pidl, PChar(FolderPath));
    SetLength(FolderPath, lstrlen(PChar(FolderPath)));
  end;
  Result := FolderPath;
end;
Unter XP liefert mir CSIDL_APPDATA das Appdata Verzeichnis den Benutzers. Unter Vista aber C:\Users\Michael\AppData\Roaming\. Wie bekomme ich das AppData Verzeichnis ohne Roaming?

Es handelt sich um 32-Bit Vista.

Es scheint eine neue CSIDL zu geben: CSIDL_LOCAL_APPDATA:
Zitat:
The file system directory that serves as a data repository for local (nonroaming) applications. A typical path is C:\Documents and Settings\username\Local Settings\Application Data.
Als ich meine LuckieDIPS geschrieben habe, gab es die CSIDL, glaube ich noch nicht.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat