<div class="content"><p>The RChangeServiceConfig2A method SHOULD<a id="Appendix_A_Target_51"></a><a aria-label="Product behavior note 51" href="041d2a89-9d7d-4f79-91a1-c336d0a668f6#Appendix_A_51" data-linktype="relative-path">&lt;51&gt;</a> change the optional
configuration parameters of a service.</p><dl>
<dd>
<div><pre> DWORD RChangeServiceConfig2A(
   [in] SC_RPC_HANDLE hService,
   [in] SC_RPC_CONFIG_INFOA Info
 );
</pre></div>
</dd></dl><p><b>hService: </b>An <a href="b5f0a0a8-887c-4097-af1c-71ef9f214ce4" data-linktype="relative-path">SC_RPC_HANDLE (section 2.2.4)</a>
data type that defines the handle to the <a href="4f66d32e-2f4f-4482-998e-e5ccbb445223#gt_1fbb7936-8437-4e3d-b62f-47df3be07721" data-linktype="relative-path">service record</a> that MUST
have been created previously, using one of the open methods specified in
section <a href="0d7a7011-9f41-470d-ad52-8535b47ac282" data-linktype="relative-path">3.1.4</a>. The
SERVICE_CHANGE_CONFIG access right MUST have been granted to the caller when
the <a href="4f66d32e-2f4f-4482-998e-e5ccbb445223#gt_9dfe84e3-a772-4ad1-9a25-1255c1dc0f84" data-linktype="relative-path">RPC context handle</a>
to the service record was created.</p><p><b>Info: </b>An <a href="f8c400d3-328b-4e6b-9d85-8135c8f790a4" data-linktype="relative-path">SC_RPC_CONFIG_INFOA (section 2.2.21)</a>
structure that contains optional configuration information.</p><p><b>Return Values: </b>The method returns 0x00000000
(ERROR_SUCCESS) on success; otherwise it returns one of the following error codes.<a id="Appendix_A_Target_52"></a><a aria-label="Product behavior note 52" href="041d2a89-9d7d-4f79-91a1-c336d0a668f6#Appendix_A_52" data-linktype="relative-path">&lt;52&gt;</a></p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>5</p>
  <p>ERROR_ACCESS_DENIED</p>
  </td>
  <td>
  <p>The SERVICE_CHANGE_CONFIG access right had not been
  granted to the caller when the RPC context handle to the service record was created.</p>
  </td>
 </tr><tr>
  <td>
  <p>6</p>
  <p>ERROR_INVALID_HANDLE</p>
  </td>
  <td>
  <p>The handle is no longer valid.</p>
  </td>
 </tr><tr>
  <td>
  <p>87</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>A parameter that was specified is invalid.</p>
  </td>
 </tr><tr>
  <td>
  <p>1072</p>
  <p>ERROR_SERVICE_MARKED_FOR_DELETE</p>
  </td>
  <td>
  <p>The RDeleteService has been called for the service
  record identified by the <i>hService</i> parameter.</p>
  </td>
 </tr><tr>
  <td>
  <p>1080</p>
  <p>ERROR_CANNOT_DETECT_DRIVER_FAILURE</p>
  </td>
  <td>
  <p>SERVICE_CONFIG_FAILURE_ACTIONS cannot be used as a <b>dwInfoLevel</b>
  in the <i>Info</i> parameter for service records with a Type value defined
  for drivers.</p>
  </td>
 </tr><tr>
  <td>
  <p>1115</p>
  <p>ERROR_SHUTDOWN_IN_PROGRESS</p>
  </td>
  <td>
  <p>The system is shutting down.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>In response to this request from the client, for a
successful operation the server MUST update the specific attributes of the
service record identified by <i>hService</i>, using the information level and
the corresponding values associated with that information level as specified in
the <i>Info</i> parameter of the client request.</p><p>If the service has a PreferredNode setting and the client
requested a change of a service record with a Type other than
SERVICE_WIN32_OWN_PROCESS, the server MUST fail the call with
ERROR_INVALID_PARAMETER (87).</p><p>If the service record ServiceGroup value is set and the
client specifies a start type of delayed autostart (see section <a href="805b8296-863d-4d1e-8ae8-f639adf8c6cb" data-linktype="relative-path">2.2.33</a>), the server MUST
fail the call with ERROR_INVALID_PARAMETER (87).</p><p>The server MUST use the process described in <a href="f9ddeebe-b05e-423c-9440-84fd3d14bee9" data-linktype="relative-path">Conversion Between ANSI and
Unicode String Formats (section 3.1.7)</a> to convert a string to the
appropriate format.</p></div>