3.1.4.48 RQueryServiceConfigEx (Opnum 56)

The RQueryServiceConfigEx  method SHOULD<82> query the optional configuration parameters of a service.

 DWORD RQueryServiceConfigEx(
   [in] SC_RPC_HANDLE hService,
   [in] DWORD dwInfoLevel,
   [out] SC_RPC_CONFIG_INFOW* pInfo
 );

hService: An SC_RPC_HANDLE (section 2.2.4) data type that defines the handle to the service record that MUST have been created previously, using one of the open methods specified in section 3.1.4. The SERVICE_QUERY_CONFIG access right MUST have been granted to the caller when the RPC context handle was created.

dwInfoLevel: The information level for the service configuration parameters. This MUST be set to 0x00000008 which corresponds to the service's trigger information.

pInfo: A pointer to an SC_RPC_CONFIG_INFOW (section 2.2.22) structure that contains optional configuration information.

Return Values: The method returns 0x00000000 (ERROR_SUCCESS) on success; otherwise, it returns one of the following error codes.

Return value/code

Description

5

ERROR_ACCESS_DENIED

The SERVICE_QUERY_CONFIG access right had not been granted to the caller when the RPC context handle was created.

6

ERROR_INVALID_HANDLE

The handle is no longer valid.

124

ERROR_INVALID_LEVEL

The dwInfoLevel parameter contains an unsupported value.

1115

ERROR_SHUTDOWN_IN_PROGRESS

The system is shutting down.

In response to this request from the client, for a successful operation the server MUST query the specific configuration information stored in the SCM database in the service record identified by the hService parameter, using the information level and the corresponding values associated with that information level as specified in the dwInfoLevel parameter of the client request. The server MUST return this configuration data by setting the pInfo parameter with the appropriate structure filled with the configuration data based on dwInfoLevel.

The server MUST return a service's trigger information by returning a SERVICE_TRIGGER_INFO structure.