service_status for Windows service

Hi,

I want to know that, Where we can check the value of dwwaithint for a service.it is a member variable of SERVICE_STATUS structure.

I am using above variable(dwwaithint) in my application for one of the service. I observed that it's value gets set to 2147483647, Which seems to be incorrect.I picked up the code from the following link:-

_http://support.microsoft.com/kb/245230

Regards,
Nitin Singhal
I'm confused, you linked the answer to your question above your sig. You have to query against the values that they use in the code you linked to. What is the trouble you are having here?
Hi,
Thanks for reply.
I think you didn't understand my question.


Actually, I am fetching the value using that code given in the link.
But using that, 2147483647 value is fetched. Which is not a possible value.

That's why I want to know from where that API fetch the value in windows???
You're supposed to provide the Wait Hint. The supplied code doesn't appear to set it to a reasonable value.
The value of wait hint is 2147483647 for that particular service. which should not be.

That's why I want to know from where that API fetch the value in windows???
Last edited on
It's something only you can provide. It allows you to tell the service control manager how long the operation is expected to take before it's considered to have timed out. There isn't a call to fill it in, you are expected to.
No i didn't provide this value to the service. This is the default value for that service.

And how we can know that what value we have to provide to a particular service.
Last edited on
There is no default. You have to specify a value. Specifying -1 just means you won't get a timeout from the service control manager, it will just hang if it can't control the service in question.
We can specify some value to the service.
but, There is always some default value for service.
There is no default. You have to specify a value.

If you think there's a default, how do you specify it?
Did you seen the link, I had mentioned in my first post?

If there is no default value, then from where we are taking value in dwWaitHint variable?
Topic archived. No new replies allowed.