Providing Services with service-specific return values

  • Thread starter Thread starter Betsy0129
  • Start date Start date
B

Betsy0129

Guest
Hi.

I am updating a C++ module that interacts with Windows Server Controller. While producing some error situations, the services panel displays a message "Windows could not start the <service_name> on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code -1."

I am trying to figure out where the service-specific error code of -1 comes from and how to provide better return values.

The last SetServiceStatus call sets dwServiceSpecificExitCode to -50, My service main function ends returning a value of 0. The Dispatch function (set with StartServiceCtrlDispatch) does not provide a return value. The call to StartServiceCtrlDispatch returns with a return value of 1.

How is the service-specific error code shown in the services GUI message set or determined ?

Thanks for any input.


Betsy

Continue reading...
 
Back
Top