Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Service WaitHint

Posted on 2003-03-18
3
Medium Priority
?
850 Views
Last Modified: 2007-12-19
Hi, it looks to me like the WaitHint property on a service application is ignored.

I set it to 500000 to be sure, but if I make a sleep(30000) somewhere in the service startup I will get a timeout - "The service is not responding to the control function" after about 30 seconds. How can I avoid this?

Regards,
Pede


0
Comment
Question by:pede
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
DaFox earned 500 total points
ID: 8158808
Hi pede.

Try to put that code into the OnExecute handler if it is in the OnStart handler atm. Another possibility would be to create a thread inside of the service.

Markus
0
 
LVL 1

Author Comment

by:pede
ID: 8158931
Hi, DaFox

I was doing the Sleep test before any of the events happened (in a contructor), moving it to either of those seems to fix it!
0
 
LVL 1

Author Comment

by:pede
ID: 8159686
Looks like I was a little too quick here :/

Doing a Sleep(30000) in onStart will prevent the service from starting, with a '...could not be started' error.

I guess I could try with a thread caling ReportStatus while the service is starting, but WaitHint should work...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Loops Section Overview
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

564 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