?
Solved

NT Service with Delphi 4

Posted on 1998-08-04
8
Medium Priority
?
470 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Independent Software Vendors: 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!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month9 days, left to enroll

765 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