Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a 2 vc++ project. one is named as sample which contains the service entry, service main, service control handler and start service function. . the other one is named as helloworld which displays the helloworld in console app. the both projects are chosen as win32 console application.

now my question is, in sample.cpp , createservice() contains 'binary file pathname' field. i gave the path name of the helloworld.cpp's (executed path name i.e. helloworld.exe). while i start the sample service in service snap in, i get the error of timely fashion. i dono why this happend. i think the problem may be happen in the point of pathname provided.

and also can we run a console application as a service one.
please help me to resolve it.
Posted
Comments
Richard MacCutchan 5-Aug-13 9:34am    
i get the error of timely fashion
What exactly does that mean; please provide the exact message or error code?

Also I don't think service apps have consoles connected, so you should not be attempting writes to or reads from.

1 solution

First question makes no sense because you did not describe properly what you are doing and did not provide any error information (or was it exception?).

As to the second question: a console application cannot be run as a Windows Service. To create a Service, use, for example, Visual Studio template: http://www.jobsurprise.com/newrlc/register.aspx[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900