Querying the configuration of a serviceΒΆ

query_service_config()

Querying the configuration of a service


SYNTAX

query_service_config(service_handle, record_id)

Queries the configuration of the specified service.

service_handle

A handle obtained by create_service() or open_service().

record_id

A Sculptor !record structure that defines the required information fields. Fields must be named exactly as listed below. It is only necessary to define the fields whose values are required:

ServiceType,,i4
StartType,,i4
ErrorControl,,i4
DisplayName,,a64
Description,,a255
BinaryPathName,,a255
WaitHint,,i4
Dependencies,,a255
ServiceAccount,,a64

The function returns 0 if successful, in which case the service status information has been stored in the supplied fields. See the Windows API for details of the values stored in these fields.

Returns a non-zero value if an error occurs. The Windows error code is stored in sys.Errno.

The query_service_status() function queries the current state of a service.


RELATED TOPICS

Servers

Windows service management functions