INFO: Dealing w/ Lengthy Processing in Service Control Handler
Article ID: 120557
Article Last Modified on 11/21/2006
APPLIES TO
- Microsoft Win32 Application Programming Interface, when used with:
- Microsoft Windows NT Advanced Server 3.1
- Microsoft Windows NT 3.51 Service Pack 5
- Microsoft Windows 2000 Standard Edition
- Microsoft Windows XP Professional
This article was previously published under Q120557
SUMMARY
The service control handler function must return within 30 seconds. If it
does not, the Service Control Manager will return the following error:
Error 2186 - The service is not responding to the control function
If a service needs to do lengthy processing when the service is in the
service control handler, it should create a secondary thread to perform the
lengthy processing and then return. This prevents the service from tying up
the service control handler thread.
Additional query words: 3.10 3.50
Keywords: kbinfo kbapi kbservice kbkernbase KB120557