![]() |
konstante Systemstrings abfragen
Kennt jemand eine API-Funktion oder ähnliches mit der man die Konstante "Neuer Ordner" in der Systemsprache abrufen kann?
Suchbegriffe: Konstanten, konstante Strings, Systemkonstante, lokalisiert |
Re: konstante Systemstrings abfragen
Hi Ronny,
wenn du den String "Neuer Ordner" in einer beliebigen Sprache haben möchtest, dann könnte das schwierig werden. Gespeichert ist er auf jeden Fall als String-Resource 30320 in der lokalisierten SHELL32.DLL:
Delphi-Quellcode:
Freundliche Grüße
function GetString(const lib: string; id: LongWord): string;
var hLib: THandle; buf: array [Byte] of Char; begin hLib := LoadLibrary(PChar(lib)); if LongBool(hLib) then try SetString(Result, buf, LoadString(hLib, id, @buf[0], SizeOf(buf))); finally FreeLibrary(hLib); end; end; procedure TDemoForm.ButtonClick(Sender: TObject); begin ShowMessage('"' + GetString('C:\WINDOWS\SYSTEM32\SHELL32.DLL', 30320) + '"'); end; |
Re: konstante Systemstrings abfragen
Ich brauchte das für nen Custom-Dialog. Die lokalisierte sollte reichen. Danke dir :bounce1:
|
Re: konstante Systemstrings abfragen
Wo ich das grad seh ...
eventuell wäre es besser, wenn man die DLL in soeinem Fall auch nur als Resource-Container läd. Also z.B. ![]() Damit wird nur das Image der DLL geladen und nicht ihre Startprozedur (EntryPoint) ausgeführt. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:04 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