![]() |
Re: Pfad zu Application Data herauslesen
Also die version meiner shell32.dll ist 6.0. Das sollte
also kein Problem sein. Kann man dann sagen ab welcher Window Version die shell32.dll Version sicher 5.0 oder höher ist?? Oder gibt es sonst noch eine andere Möglichkeit diese Systempfade herauszulesen?? |
Re: Pfad zu Application Data herauslesen
Hai Flinton,
bei mir läuft es ab Windows 2000 prof. aufwärts. Unter Win 98 geht es nicht. Ein Win ME habe ich nicht installiert. |
Re: Pfad zu Application Data herauslesen
Ich habe mal eben D5 angeworfen:
Delphi-Quellcode:
Das Herzstück ist der API-Call SHGetSpecialFolderLocation() und zu dem sagt der Windows Platform SDK:
program Demo;
{$APPTYPE CONSOLE} uses Windows, SysUtils, ActiveX, ShlObj; function IncludeTrailingPathDelimiter(path: String): String; begin Result := IncludeTrailingBackslash(path); end; function GetSpecialFolderLocation(csidl: integer): string; var pMalloc: IMalloc; pidl: PItemIDList; path: array [0..MAX_PATH] of Char; begin Result := '?'; if SHGetMalloc(pMalloc) = S_OK then begin SHGetSpecialFolderLocation(0, csidl, pidl); SHGetPathFromIDList(pidl, path); Result := IncludeTrailingPathDelimiter(Path); pMalloc.Free(pidl); end; end; begin WriteLn(GetSpecialFolderLocation($23)); end.
Code:
marabu
Minimum DLL Version shell32.dll version 4.7 or later
Custom Implementation No Header shlobj.h Import library shell32.lib Minimum operating systems Windows NT 4.0, Windows 95 |
Re: Pfad zu Application Data herauslesen
Zitat:
Aber zu CSIDL_COMMON_APPDATA sagt das SDK Zitat:
|
Re: Pfad zu Application Data herauslesen
Da hast du auch richtig gedacht, Sharky. :)
Die Konstante CSIDL_COMMON_APPDATA gibt es erst ab Windows 2000. Im PSDK findet man eine Übersicht, welche shell32.dll-Version welcher Windows-Version beiliegt. |
Re: Pfad zu Application Data herauslesen
Moin Zusammen,
Zitat:
|
Re: Pfad zu Application Data herauslesen
Hallo,
Zitat:
In
Delphi-Quellcode:
ist CSIDL_COMMON_APPDATA enthalten.
uses SHFolder
lg Sebastian |
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:37 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz