AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Why Cant Start A service.

Ein Thema von ZuBi · begonnen am 21. Jun 2005 · letzter Beitrag vom 20. Aug 2005
 
Olli
(Gast)

n/a Beiträge
 
#6

Re: Why Cant Start A service.

  Alt 23. Jun 2005, 20:02
Zitat von ZuBi:
i quite sure the problem is in there, there for i debug it

Delphi-Quellcode:
FillChar(DispatchTable, SizeOf(DispatchTable), 0);
DispatchTable[0].lpServiceName:= PChar(S_Name);
DispatchTable[0].lpServiceProc:= @ServiceProc;
If not StartServiceCtrlDispatcher(DispatchTable[0]) Then AddToMessageLog('StartServiceCtrlDispatcher error');
Straight from this code there's no obvious mistake!

Zitat von ZuBi:
Log:
Code:
[16:02:13] StartServiceCtrlDispatcher error
its seems its not passing this so the problem comes from there, i tryed to see if its somthing with ServiceProc but when i put there a log, its ont wrting anything so its not getting to there,
So control is not passed to the SCM?

Zitat von ZuBi:
i am trying to implent service in a dll( is it other method ? ).
I doubt that will work, since DLLs and PE/EXE files share only the structure but differ by many flags. The SCM was made to get control over an EXE file, not a DLL.

Zitat von ZuBi:
i know its to know the problem from this few lines i have posted, there for i will post all soon.

Ps: It seems it cant register the proc (@ServiceProc) so it cant find the procedure, i dont know why.
Could you please add a GetLastError() after the IF-condition and tell us the error code?! There must be one.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:39 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz