![]() |
Re: HKEY und String was tuen ?
Oder einfach
Delphi-Quellcode:
uses Registry
var Reg:TRegistry; s:String; ... Reg:=TRegistry.Create; Reg.RootKey:=HKEY_LOCAL_MACHINE; Reg.OpenKey('Software/meinekeys',false) //false = bei nicht-existenz NICHT erstellen s:=Reg.ReadString('wert1') |
Re: HKEY und String was tuen ?
sorry leute hatte eben erst zeit eure post anzuschauen ...1a !
Delphi-Quellcode:
das ist es....einfach und schnell.....10000000 DANKE
function StrToHKEY(Key: string): HKEY;
begin if Key = 'HKEY_CURRENT_USER' then Result := HKEY_CURRENT_USER; //...usw end; |
Re: HKEY und String was tuen ?
Für alle die die gegenteilige Funktion interessiert:
Delphi-Quellcode:
function TForm1.hkeytostr(rootkey:hkey):string;
begin case rootkey of HKEY_CLASSES_ROOT : result := 'HKEY_CLASSES_ROOT'; HKEY_CURRENT_USER : result := 'HKEY_CURRENT_USER'; HKEY_LOCAL_MACHINE : result := 'HKEY_LOCAL_MACHINE'; HKEY_USERS : result := 'HKEY_USERS'; HKEY_CURRENT_CONFIG : result := 'HKEY_CURRENT_CONFIG'; end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:10 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