看看我写的服务程序,非常简单的,就是不管用,在控制面板中根本就查不到该服务 我在编译时已经加了 /INSTALL参数了啊(50分)

  • 主题发起人 主题发起人 wp231957
  • 开始时间 开始时间
W

wp231957

Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit2;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr, Dialogs,
ExtCtrls;

type
TService2 = class(TService)
Timer1: TTimer;
procedure ServiceStart(Sender: TService; var Started: Boolean);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
function GetServiceController: TServiceController; override;
{ Public declarations }
end;

var
Service2: TService2;

implementation

{$R *.DFM}

procedure ServiceController(CtrlCode: DWord); stdcall;
begin
Service2.Controller(CtrlCode);
end;

function TService2.GetServiceController: TServiceController;
begin
Result := ServiceController;
end;

procedure TService2.ServiceStart(Sender: TService; var Started: Boolean);
begin
timer1.Enabled:=true ;
end;

procedure TService2.Timer1Timer(Sender: TObject);
begin
showmessage('ok');
end;

end.
 
http://www.delphibbs.com/delphibbs/dispq.asp?lid=2601318
 
穷死了,要分
 
后退
顶部