Solved

NT Service with Delphi 4

Posted on 1998-08-04
8
433 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

16 Experts available now in Live!

Get 1:1 Help Now