Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

NT Service with Delphi 4

Posted on 1998-08-04
8
Medium Priority
?
479 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 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

Industry Leaders: 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

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…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

610 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