RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TService.GetServiceController Method

Returns the service's registered handler function.

Pascal
function GetServiceController: TServiceController; virtual; abstract;
C++
virtual __fastcall TServiceController GetServiceController() = 0;

GetServiceController returns the handler for the service. You do not need to call this function directly. The service object's main function calls it automatically.

Note: Each service in the service application has a main function for that service. When a request is made to start the service, the main thread of the service calls the RegisterServiceCtrlHandler function to register this control handler function. TService automatically calls RegisterServiceCtrlHandler and returns this handler function. Because this function cannot be a class method (member function), the Service application wizard generates code that creates a non-member handler, (ServiceController) for your service object. This routine returns the service object's Handler (Controller).
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!