Solved

NT Service with Delphi 4

Posted on 1998-08-04
8
438 Views
Last Modified: 2010-05-18
I have to implement an NT service with Delphi 4. The Classes TServiceApplication and TService are logic to me. The problem is that i do not know how to register the service within the NT (workstation or server) system.

Which is the instance that calls the Windows API functions CreateService, StartService and so on ?

When i start the application (TServiceApplication with one TService object) the events OnStart and OnExecute are never fired ? The application is running for about 15 secunds and than it stops.

Would be nice if you can help me !

thanks
bernhard


Dipl. Ing. Bernhard Angerer
IFT / Vienna University of Technology
Karlsplatz 13/311
A-1040 Wien
Tel: +43 1 58801 3192
Fax: +43 1 504 14 97
angerer@mail.ift.tuwien.ac.at
0
Comment
Question by:angerer
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 1

Author Comment

by:angerer
ID: 1359642
Adjusted points to 250
0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1359643
As far as I remember (I don't have my D4 around), you can register the service by calling the EXE file with an INSTALL switch (and UNINSTALL if you want to uninstall it)
If you don't get any other feedback, I'll check more on it when I return to my D4 tomorrow..
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1359644
angerer,

I don't know much of these, sorry. The only thing I know is that there is a library which has combined all the needed API of NT. Here is the link : challenge.live-net.de/belcaf/shareware/ntset105.zip.

I also suggest you to look at Winsvc.pas file in the delphi\source\rtl\win . there should all functions be decribed.

Regards, Zif.

Let me know, if I can help you further. Be more specific in your Question (Maybe I can do a little research)
0
 

Expert Comment

by:curedone
ID: 1359645
There is beautiful class TNTService which was written by some German guy. It implements all the framework of the NT service and affords one to make a service in 15 minutes. Unfortunately i don't remember where from i have downloaded that but if you care i might send it to you
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 8

Expert Comment

by:ZifNab
ID: 1359646
curedone,

The component you're refering to is the same as the library I proposed, see at : www.belcaf.com/products/english/ntset.html
or just www.belcaf.com
It's shareware....

Zif.
0
 
LVL 1

Author Comment

by:angerer
ID: 1359647
Dear BlackMan !

this is exactly the solution :-)

thank you very much

bernhard
0
 
LVL 7

Accepted Solution

by:
BlackMan earned 250 total points
ID: 1359648
You can register the service by calling the EXE file with an INSTALL switch (and UNINSTALL if you want to uninstall it)

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1359649
heh? Is this all we need? Great...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now