Services in XPe

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a custom service that I've developed. The service works correctly in Win NT & XP but has problems with my build of XPe. On startup the service starts correctly and runs normally but I have trouble on shut down. Is there a list of components that I must include to be sure I have all of the components for a gerneral service to run.
 
Tom,

I assume you have included "Service Control Manager (SCM)" in the image
(otherwise you couldn't even start the service). But have you resolved all
SCM dependencies?
You haven't mentioned what kind of errors you see on shut down (service
shutdown or system shutdown?). So did you include your particular service
dependecies (just walk trhough them using Dependency Walker).
Try to put error handling somewhere in SERVICE_CONTROL_STOP handler function
to check the service status and/or possible errors.

Another thing to mention is your Event Viewer log. Any related errors there?

KM
I have a custom service that I've developed. The service works correctly
in Win NT & XP but has problems with my build of XPe. On startup the service
starts correctly and runs normally but I have trouble on shut down. Is there
a list of components that I must include to be sure I have all of the
components for a gerneral service to run.
 
I have SCM in the image and have auto resolve on to resolve all of the dependencies. The error message I'm getting is an exception breakpoint (0x80000003). In checking the code for the SERVICE_CONTROL_STOP handler everything looks normal. When running "net stop servicename" the service reports back that it is stopped, and indeed it is but then I get the exception breakpoint
 
Tom,

A few general hints:
1) Are you able to repro the problem on XP Pro machine?
2) Is is a multithreaded service? Then, make sure your service's main thread
function (Service_Main, the one that called by the service control manager
after the call to StartServiceCtrlDispatcher) does not exit until
service_ctrl processes the SERVICE_CONTROL_STOP. You can sync that by using
an event or mutex.
3) You can set up a remote debbuger (VC/WinBdg/etc.) to debug your service
properly.
This article will help you understanding how to debug a Windows Service:
http://support.microsoft.com/default.aspx?scid=kb;en-us;170738.
If you set a breakpoint in service_ctrl (particulary in on the
SERVICE_CONTROL_STOP handler), does it get hit?
4) Did you check other items I pointed out in the previous post (service
dependencies, Event View log)?
5) You can show us your service_ctrl function implementation. Maybe the
problem is in there.
6) Post your questions to a win32 programmer newsgroup. You may get a better
help there.

KM
I have SCM in the image and have auto resolve on to resolve all of the
dependencies. The error message I'm getting is an exception breakpoint
(0x80000003). In checking the code for the SERVICE_CONTROL_STOP handler
everything looks normal. When running "net stop servicename" the service
reports back that it is stopped, and indeed it is but then I get the
exception breakpoint.
 
Hi Tom,

Are you sure that you don't have remnants of "int 3" calls in your code?

Use functions like OutputDebugString in your code so you can easily trace
STOP process from remote debugger.

Regards,
Slobodan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Tell
Microsoft!
https://www.windowsembeddedeval.com/community/newsgroups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Tom said:
I have SCM in the image and have auto resolve on to resolve all of the
dependencies. The error message I'm getting is an exception breakpoint
(0x80000003). In checking the code for the SERVICE_CONTROL_STOP handler
everything looks normal. When running "net stop servicename" the service
reports back that it is stopped, and indeed it is but then I get the
exception breakpoint.
 
Back
Top