![]() |
TcxPropertiesStore > in AppData speichern
Hi,
die DevExpress Site ist gerade offline, deshalb frage ich hier mal schnell. Weiß jemand spontan, wie man TcxPropertiesStore dazu bringt in die ini in %appdata%\<myApp> zu speichern anstatt im Anwendungspfad? Property "StorageName" auf "%appdata%\MyApp\Settings.cxproperties" setzen funktioniert leider nicht. Zur Not löse ich es über SaveToStream, aber eigentlich würde ich bei DevExpress annehmen, dass es bei so einem allgemeinen Feature auch auch eine fertige Lösung gibt ... |
AW: TcxPropertiesStore > in AppData speichern
Wieso löst Du 'AppData' nicht einfach selbst auf?
Delphi-Quellcode:
Function LocalAppDataPath(AppNameWithoutExtension: String): String;
Begin Result := IncludeTrailingPathDelimiter(GetSpecialFolderLocation(CSIDL_LOCAL_APPDATA)); Result := IncludeTrailingPathDelimiter(Result + AppNameWithoutExtension); ForceDirectories(Result) 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 Try SHGetSpecialFolderLocation(0, csidl, pidl); SHGetPathFromIDList(pidl, path); Result := IncludeTrailingPathDelimiter(Path); Finally pMalloc.Free(pidl); End; End; |
AW: TcxPropertiesStore > in AppData speichern
Hatte ich gestern schon gemacht.
Ich hätte nur nicht erwartet, dass DevExpress die ini ohne Rückfrage per Default ins Anwendungs-/Arbeitsverzeichnis schreibt. Scheint als hätte TxPropertiesStorage schon länger keine Zuwendung von denen bekommen.... Grüße Jens |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:00 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