3.1.4.9 RUnlockServiceDatabase (Opnum 8)

The RUnlockServiceDatabase method releases a lock on a service database.

 DWORD RUnlockServiceDatabase(
   [in, out] LPSC_RPC_LOCK Lock
 );

Lock: An LPSC_RPC_LOCK (section 2.2.5) data type that defines the database lock context handle created by a previous call to the RLockServiceDatabase method.

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

Return value/code

Description

1071

ERROR_INVALID_SERVICE_LOCK

The specified RPC context handle is invalid.

In response to this request from the client, for a successful operation the server MUST unlock the SCM database for the lock specified in the Lock parameter of the client request. Once the database is unlocked, the server MUST stop responding with error code ERROR_SERVICE_DATABASE_LOCKED (1055) for future RLockServiceDatabase, RStartServiceW, and RStartServiceA RPCs until the database is locked again. All other methods are unaffected.<38>