<div class="content" name="AddConfigSection" uuid="94777dd6-65e1-4d83-9214-75ed78176812"><p>The AddConfigSection method is received by the server in an
RPC_REQUEST packet. In response, the server attempts to create a new empty <a href="59774887-09e3-4de5-ad8e-4794f404b123" data-linktype="relative-path">IAppHostElement</a> and add it
to the specified <a href="1939cfaf-92c9-40b5-9cca-791c531c01e6" data-linktype="relative-path">IAppHostConfigLocation</a>.
The server MAY choose to create the IAppHostElement object in memory only and
not persist it to permanent storage, such as a disk file, until later.</p><dl>
<dd>
<div><pre> HRESULT AddConfigSection(
   [in] BSTR bstrSectionName,
   [out, retval] IAppHostElement** ppAdminElement
 );
</pre></div>
</dd></dl><p><b>bstrSectionName: </b>The name of the new
IAppHostElement section to add.</p><p><b>ppAdminElement: </b>Contains a newly created
IAppHostElement.</p><p><b>Return Values: </b>The server MUST return zero if
it successfully processes the message that is received from the client. In this
case, *ppAdminElement is not NULL. If processing fails, the server MUST return
a nonzero <a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a>
code as defined in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>.
The following table describes the error conditions that MUST be handled and the
corresponding error codes. A server MAY return additional
implementation-specific error codes.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0X00000000 NO_ERROR</td>
  <td>The operation completed successfully.</td>
 </tr><tr>
  <td>0X80070057 ERROR_INVALID_PARAMETER</td>
  <td>One or more parameters are incorrect or null.</td>
 </tr><tr>
  <td>0X800700B7 ERROR_ALREADY_EXISTS</td>
  <td>A configuration element with the name specified by bstrSectionName already exists.</td>
 </tr><tr>
  <td>0X80070013 ERROR_INVALID_DATA</td>
  <td>Configuration data or schema on the server are malformed or corrupted.</td>
 </tr><tr>
  <td>0X80070021 ERROR_LOCK_VIOLATION</td>
  <td>The instance is not editable.</td>
 </tr></tbody></table>
</dd></dl><p> </p></div>