Who is a great god can send a code to create a Windows service goods method, which is able to directly use the best, I first contact Windows service knowledge,
CodePudding user response:
Reference CAtlServiceModuleT
CodePudding user response:
reference 1st floor hurryboylqs response: reference CAtlServiceModuleT See the online tutorial, I want to ask next formal operation of the content is written in the book of the function, I added a run function, but it seems not, CodePudding user response:
You want to be in the main function calls the WinMain function of a class, the entire process to work Add your own code can override the Start function CodePudding user response:
reference hurryboylqs reply: 3/f call you want to be in the main function of this class WinMain function, the entire process to work Add your own code can override the Start function If within the Run function to join the circle may not start, what method can let the service cycle to Run the code inside the worker thread, because I am the service is a testing services, need to start and then Run an infinite loop, CodePudding user response:
You can't block service the boot process, you need to do testing services can create a thread executing your logic