<div class="content" name="RUnlockServiceDatabase" uuid="3456de79-5250-4982-8a30-debd2ea0df92"><p>The RUnlockServiceDatabase method releases a lock on a
service database.</p><dl>
<dd>
<div><pre> DWORD RUnlockServiceDatabase(
   [in, out] LPSC_RPC_LOCK Lock
 );
</pre></div>
</dd></dl><p><b>Lock: </b>An <span><a href="69737921-6d31-4731-b3f8-56f3bc510e5a" data-linktype="relative-path">LPSC_RPC_LOCK (section 2.2.5)</a></span>
data type that defines the database lock context handle created by a previous
call to the <span><a href="ff71f732-e91d-4189-8fb9-a410674c63ad" data-linktype="relative-path">RLockServiceDatabase</a></span>
method.</p><p><b>Return Values: </b>The method returns 0x00000000
(ERROR_SUCCESS) on success; otherwise, it returns the following error code.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>1071 ERROR_INVALID_SERVICE_LOCK</td>
  <td>The specified RPC context handle is invalid.</td>
 </tr></tbody></table>
</dd></dl><p>In response to this request from the client, for a
successful operation the server MUST unlock the <span><a href="4f66d32e-2f4f-4482-998e-e5ccbb445223#gt_afc3f782-a908-486d-9c05-8a054cd9cc84" data-linktype="relative-path">SCM</a></span> database for the
lock specified in the <i>Lock</i> 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 <b>RLockServiceDatabase</b>, <b>RStartServiceW</b>, and <b>RStartServiceA</b>
RPCs until the database is locked again. All other methods are unaffected.<a id="Appendix_A_Target_38"></a><a aria-label="Product behavior note 38" href="041d2a89-9d7d-4f79-91a1-c336d0a668f6#Appendix_A_38" data-linktype="relative-path">&lt;38&gt;</a></p></div>