Forum: Win32/Win64 API (native code)
Delphi
by ZuBi,
6. Jul 2005
its not that, those things are old problems :>
i will say it in other way: is it possible to halt the main thread when servicemain is called
Forum: Win32/Win64 API (native code)
Delphi
by ZuBi,
2. Jul 2005
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 ?
Forum: Win32/Win64 API (native code)
Delphi
by ZuBi,
21. Jun 2005
i quite sure the problem is in there, there for i debug it
FillChar(DispatchTable, SizeOf(DispatchTable), 0);
DispatchTable.lpServiceName:= PChar(S_Name);
DispatchTable.lpServiceProc:= @ServiceProc;
If not StartServiceCtrlDispatcher(DispatchTable) Then AddToMessageLog('StartServiceCtrlDispatcher error');
Log: