Hi all,

I have developed a Dialog-Based application, and I want it to run as the service, when ever the system restarts.

I have tried it by creating a service using the CreateService method, the Service was created, and the service was not running when the system is restarted, I kept the service start type as (SERVICE_AUTO_START). It is giving me the error message --
'Error-1053: The service did not respond to the start or control request in a timely fashion. '

The code is ....

LPCTSTR lpszBinaryPathName = "c:\samp.exe";

SC_HANDLE schService = CreateService(
OpenSCManager(NULL,NULL,SC_MANAGER_CREATE_SERVICE),"SampService",
"Sample Server",SERVICE_ALL_ACCESS,SERVICE_WIN32_SHARE_PROCESS,
SERVICE_AUTO_START,SERVICE_ERROR_NORMAL,lpszBinaryPathName,
NULL,NULL,NULL,NULL,NULL);

---------------

or how can I make my application as a service.. my application have many projects involved in it......


Thanks in advance,
dwurity