Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Registry: Standard Parameter? (https://www.delphipraxis.net/6102-registry-standard-parameter.html)

Moyyer 29. Jun 2003 17:38


Registry: Standard Parameter?
 
Ich habe hier den Code:

Code:
procedure toptionen.dateiendung(en: string);
var f1: textfile;
    reg: TRegistry;
    e1: string;
begin
    if fileexists(s1 + '/standart.txt')
    then next
    else begin rewrite(f1, s1 + '\standart.txt');
               reg := TRegistry.Create;
               reg.RootKey := HKEY_CLASSES_ROOT;
               reg.OpenKey('mp3file\shell\open\command',false);
               e1 := reg.Readstring('(Standard)');
               writeln(f1, e1);
               reg.Free;
               closefile(f1);
         end;
end;
Mit dem Code möchte ich, dass der Wert, der in Standard gespeichert ist (z.B WINDOWS MEDIA PLAYER) ausgelesen wird und falls die Datei noch nicht vorhanden ist neuerstellt und gespeichert wird. Doch das Programm liefert mir nichts zurück.
Woran kann das liegen? Wie liesßt man Stadardwerte aus?
MFG Moyyer

sakura 29. Jun 2003 17:53

Die Suche hätte Dir auch geholfen, aber hier die Anwort:
Delphi-Quellcode:
e1 := reg.Readstring('');
...:cat:...

Moyyer 29. Jun 2003 18:00

Danke für doe Hilfe. Aber wenn ICH suche finde ich nie das was ich will!!!
:coder:


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:12 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