AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

SHGetSpecialFolderLocation unter Vista

Ein Thema von Luckie · begonnen am 5. Jun 2009 · letzter Beitrag vom 5. Jun 2009
 
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
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:59 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz