Recent

Author Topic: TDaemon minimal example crashes  (Read 3511 times)

Eclipticon

  • Jr. Member
  • **
  • Posts: 51
TDaemon minimal example crashes
« on: October 20, 2011, 10:29:38 pm »
Hi all,

I am working on a Windows service, using the TDaemon class. For demonstration purposes, if have created a minimalisic example of an implementation (see attachment).

  • DaemonTest.exe -i and DaemonTest.exe -u for installation/deinstallation of the service work properly.
  • Whenever I try to start the service from the "Services" list, I get an error message like "The service ... could not be started on the local computer. Error 3: The system can not find the path specified." (translated from German) - which makes no sense, because it is a very ordinary path name, without spaces or special characters.
  • Trying to start the service with DaemonTest.exe -r causes an "An unhandled Exception occured at ... EAccessViolation" error after a few seconds.

What am I doing wrong?! >:( I also wanted to ask if there is any simpler approach to write a service for Windows, because in this particular case, a Unix daemon makes no sense anyway ...

Thanks :-)
Lazarus 1.2.4 on Win XP/7 Virtual Machine