RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TService.OnStart Event

OnStartup occurs when the service first starts up, before the OnExecute event.

Pascal
property OnStart: TStartEvent;
C++
__property TStartEvent OnStart;

This event should be used to initialize the service. For example, if each service request is handled in a separate thread (a good idea if handling the request takes much time) the thread for a request is spawned in an OnStart event handler. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!