I’m trying to register an atl service using
ExeName.exe /service
as described here: http://msdn.microsoft.com/en-us/library/74y2334x(VS.80).aspx
After doing so though, it’s not appearing in my services control panel (the one that I get to by typing Services in the start box on vista).
I’ve tried to dig through the atl code to see where it handles the /service switch, but can’t find it, although I can find code to handle /RegServer and /UnregServer
This used to work, I’ve somehow managed to register this service before. But, now I’ve moved its location and can’t get it registered again. When I run ExeName.exe /service, it does start up as a Local Server if I do a /RegServer first, but I want it installed as a service.
Am I missing something, and do you know where the handling of the /service switch is done?
Check that you haven’t accidentally typed some characters in the name of the function ParseCommandLine in class CAtlServiceModuleT defined in atlbase.h
If you do so, there’s a version of this function also in the base class which will mean eveything will compile nicely, and it could take you all day to spot this daft mistake!
😉