unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Registry, StdCtrls;
function RegisterServiceProcess(dwProcessID, dwType: DWord): DWord;
type
TForm1 =
class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function RegisterServiceProcess(dwProcessID, dwType: DWord): DWord;
external '
KERNEL32.DLL';'
RegisterServiceProcess';
procedure TForm1.Button1Click(Sender: TObject);
begin
RegisterServiceProcess(0,1);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
RegisterServiceProcess(0,0);
end;
end.