<div class="content"><p>The IStringCollection::Insert (opnum 16) method inserts an
item into the collection at a given position.</p><dl>
<dd>
<div><pre> HRESULT Insert(
   [in] LONG index,
   [in] BSTR value
 );
</pre></div>
</dd></dl><p><b>index: </b>The position at which to insert the
string.</p><p><b>value: </b>The string to insert into the
collection.</p><p><b>Return Values: </b>The method MUST return
information in an <b>HRESULT</b> data structure. The severity bit in the
structure identifies the following conditions:</p><ul><li><p><span><span>  </span></span>If
the severity bit is set to 0, the method completed successfully.</p>
</li><li><p><span><span>  </span></span>If
the severity bit is set to 1, the method failed and encountered a fatal error.</p>
</li></ul><dl>
<dd>
<p>If the collection is read-only,
the server SHOULD return WU_E_NOT_SUPPORTED (0x80240037).</p>
</dd>
<dd>
<p>If the index is less than
0x00000000 or greater than the number of items in the collection, the server
SHOULD return WU_E_INVALIDINDEX (0x80240007). The server MUST allow insertion
at the end of the collection.</p>
</dd></dl><p><b>Exceptions Thrown:</b> No exceptions are thrown
beyond those thrown by the underlying RPC protocol <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>.</p><p>This method SHOULD insert the given value into its <b>List</b>
ADM element at the given index, and increment the value of its <b>Count</b> ADM
element.</p></div>