En  Fa
softprojects.org
Discovering: Tips & Tricks  > Languages  > Delphi Tips  > Is a windows service installed with delphi
 

Articles

 

 

Tips and Tricks

 


 

Is a windows service installed with delphi

Print version  

Is a windows service installed with delphi

Description

Add WinSvc to uses then use this code.

Delphi code

procedure TForm1.Button1Click(Sender: TObject);
var
  SCManHandle, SvcHandle: THandle;
begin
  SCManHandle := OpenSCManager('Your_Machine_Name', nil, SC_MANAGER_CONNECT);

  if (SCManHandle > 0) then
    SvcHandle := OpenService(SCManHandle, 'Service_Name', SERVICE_QUERY_STATUS);

  if SvcHandle > 0 then //is service installed then .....
  //...

   CloseServiceHandle(SvcHandle);
end;
Details
      
Writer: Salar Khalilzadeh
Date Sent: 8/22/2008 10:45 AM
Views: 106
Votes: 0
Rating: Not Rated from Not Rated

Your Rating:
bookmark this
 

There is no comment for this topic.

Language:

Copyright © 2008 SoftProjects.org | About | Valid XHTML | CSS