<div class="content"><p>The GetById method returns the object from the collection of
<b>Objects Being Enumerated</b> (section <a href="1cdf303c-95df-41ff-94a5-c1f5f9a17dc4" data-linktype="relative-path">3.2.1.11</a>) whose ID matches
the specified <i>id</i>.</p><dl>
<dd>
<div><pre> [id(FSRM_DISPID_COLLECTION | 0x03)] HRESULT GetById(
   [in] FSRM_OBJECT_ID id,
   [out, retval] VARIANT* entry
 );
</pre></div>
</dd></dl><p><b>id: </b>The ID to use for identifying the object
to be returned.</p><p><b>entry: </b>Pointer to a <b>VARIANT</b> structure.
Upon successful completion, it SHOULD contain the <a href="../ms-oaut/ac9c502b-ac1c-4202-8ad4-048ac98afcc9" data-linktype="relative-path">IDispatch</a>
interface of the object from the collection of <b>Objects Being Enumerated</b>
whose ID matches the specified <i>id</i>.</p><p><b>Return Values: </b>The method MUST return zero on
success, or a nonzero error code on failure.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x80045301</p>
  <p>FSRM_E_NOT_FOUND</p>
  </td>
  <td>
  <p>An object with the specified ID was not found in the collection.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>E_INVALIDARG</p>
  </td>
  <td>
  <p>This code is returned for the following reasons:</p>
  <ul><li><p><span><span>  
  </span></span><span>The <i>entry</i> parameter is
  NULL.</span></p>
  </li><li><p><span><span>  
  </span></span><span>The objects in the collection of <b>Objects
  Being Enumerated</b> are not one of the following interfaces: <b>IFsrmFileScreen</b>,
  <b>IFsrmFileScreenException</b>, <b>IFsrmFileScreenTemplate</b>, <b>IFsrmFileGroup</b>,
  <b>IFsrmQuota</b>, <b>IFsrmQuotaTemplate</b>, <b>IFsrmAction</b>, <b>IFsrmReportJob</b>,
  <b>IFsrmReport</b>, <b>IFsrmClassifcationRule</b>, <b>IFsrmPropertyDefinition</b>,
  <b>IFsrmPipelineModuleDefinition</b> or <b>IFsrmFileManagementJob</b>.</span></p>
  </li></ul></td>
 </tr></tbody></table>
</dd></dl><p>Upon receiving this message, the server MUST validate
parameters:</p><ul><li><p><span><span> 
</span></span>Verify that <i>entry</i> is not NULL.</p>
</li></ul><p>If any validation fails, the server MUST terminate
processing and return a nonzero error code.</p><p>The server MUST do one of the following:</p><ul><li><p><span><span> 
</span></span>Set <i>entry</i> to the IDispatch interface of the object whose
ID matches the value of the <i>id</i> parameter.</p>
</li><li><p><span><span> 
</span></span>If no object in the collection of <b>Objects Being Enumerated</b>
has an ID that matches the specified <i>id</i>, the server SHOULD return
FSRM_E_NOT_FOUND.</p>
</li><li><p><span><span> 
</span></span>The server SHOULD return E_INVALIDARG if the objects in the
collection of <b>Objects Being Enumerated</b> are not one of the following
interface types: <b>IFsrmFileScreen</b>, <b>IFsrmFileScreenException</b>, <b>IFsrmFileScreenTemplate</b>,
<b>IFsrmFileGroup</b>, <b>IFsrmQuota</b>, <b>IFsrmQuotaTemplate</b>, <b>IFsrmAction</b>,
<b>IFsrmReportJob</b>, <b>IFsrmReport</b>, <b>IFsrmClassifcationRule</b>, <b>IFsrmPropertyDefinition</b>,
<b>IFsrmPipelineModuleDefinition</b> or <b>IFsrmFileManagementJob</b>.</p>
</li></ul></div>