Einzelnen Beitrag anzeigen

ZuBi

Registriert seit: 21. Jun 2005
8 Beiträge
 
#11

Re: Why Cant Start A service.

  Alt 2. Jul 2005, 22:59
Zitat von Olli:
The perhaps most interesting thing (which you did wrong as well) is, that you MUST NOT use StartServiceCtrlDispatcher(). Actually this function does nothing more than passing the dispatcher function address to the SCM. The SCM calls it and the service EXE is no more than a "quasi-DLL" of the SCM from this point.

So this was your first mistake. You don't need to call this function because it is only needed if your service was located in an EXE file!

... to be continued ...
wow nice, where did u read that ? (i didnt know this), thats make me to next qustion then, how can i know if the program is running a service, and not called by rundll( if i got true with (StartServiceCtrlDispatcher) means its running as a servie)), is it possible without making a function for connect to scm and chk the status ?
  Mit Zitat antworten Zitat