Note: not in Win 2000 :(. For NT compatibile systems, check the "Big brother Delphi code toolkit"
~~~~~~~~~~~~~~~~~~~~~~~~~
implementation
const
RSPSIMPLESERVICE = 1;
RSPUNREGISTERSERVICE = 0;
function RegisterServiceProcess
(dwProcessID, dwType: DWord) : DWord;
stdcall; external 'KERNEL32.DLL';
procedure TForm1.FormDestroy (Sender: TObject) ;
begin
RegisterServiceProcess
(GetCurrentProcessID, RSPUNREGISTERSERVICE)
end;
procedure TForm1.FormCreate (Sender: TObject) ;
begin
RegisterServiceProcess
(GetCurrentProcessID, RSPSIMPLESERVICE)
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
Delphi tips navigator:
» Does my CD-ROM drive contain an audio CD?
« The state of the Shift, Ctrl, Alt keys

