Hi guys.
Got a problem with windows daemons.
I've made my own windows service after instaling lazdaemon package.
Lazarus 0.9.30 (FPC 2.4.2) on Windows Server 2003 X64
Lararus 0.9.31 (FCP 2.4.4) on Vista 32
Rebuild Lazarus: OK
Create new project as service: got the service frame (mapper and daemon components)
Daemon class assigned into on item of mapper
Events implemented:
Mapper: Create, Destroy, Install, Run, Uninstall. Code is only a comment in a text flat file
Daemon: Create, Destroy, Start, Stop, Execute. Same code as above except for Start in which the code launches a Thread which writes comments into the same text file, one live every second, for ever, until thread is terminated (in Stop event).
So far so good.
BUT:
Pragram.exe -install works (got the comments in the text file)
Pragram.exe -uninstall works (got the comments in the text file)
Mapper and Daemon are both registered, created, destoyed
Within Services manager: start service and stop service do nothing at all. I mean neither procedures nor events are fired and nothing is written into the text file.
Both versions (Win32 and Win64) give exactly the same results: Start Stop do not work.
BTW, I've compiled and run the example cleandirs and it doesn't work either. I have replaced then original thread code by my own and commented all directory process code. It has been replaced by my own code.
New ideas are welcome.
Antonio.