Solved

NT Service with Delphi 4

Posted on 1998-08-04
8
459 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 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