Noch ein kurzes Beispiel:
Delphi-Quellcode:
program Stups;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
var
Idx: Integer;
begin
try
for Idx := 0
to ParamCount
do
Writeln(Idx, '
: ', ParamStr(Idx));
{ TODO -oUser -cConsole Main : Insert code here }
except
on E:
Exception do
Writeln(E.ClassName, '
: ', E.
Message);
end;
Readln;
end.
EXE als C:\Temp\Stups.exe speichern.
Registry Eintrag:
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\stups]
@="
URL:Note Handler"
"
URL Protocol"=""
[HKEY_CLASSES_ROOT\stups\shell]
@="open"
[HKEY_CLASSES_ROOT\stups\shell\open]
[HKEY_CLASSES_ROOT\stups\shell\open\command]
@="\"C:\\Temp\\Stups.exe\" %1"
Und dann im Browser stups://test-the-protokol@here#there
...
...