<div class="content" name="GetFileGroup" uuid="680eb944-ffd8-4ea3-b92a-4b3419ba638d"><p>The GetFileGroup method returns a pointer to the <a href="809180e0-571e-40a0-8067-ffe89cbdcc40#gt_1f828be2-7a1b-4671-b82d-76b974874edc" data-linktype="relative-path">file group</a> with the
specified <b>Name</b> property from the <b>List of Persisted File Groups</b>
(section <a href="6226bc6a-8346-416f-83f9-3c121bdd6e59" data-linktype="relative-path">3.2.1.3</a>).</p><dl>
<dd>
<div><pre> [id(FSRM_DISPID_FILEGROUP_MANAGER | 0x02)] HRESULT GetFileGroup(
   [in] BSTR name,
   [out, retval] IFsrmFileGroup** fileGroup
 );
</pre></div>
</dd></dl><p><b>name: </b>Contains the <b>Name</b> of the file
group to return. The maximum length of this string MUST be 4,000 characters.</p><p><b>fileGroup: </b>Pointer to an <b>IFsrmFileGroup</b>
interface pointer (section <a href="3cd77924-5b8d-4695-997e-df13e335c67f" data-linktype="relative-path">3.2.4.2.23</a>)
that upon completion points to the file group with the specified <b>Name</b>
property. The caller MUST release the file group when it is done with it.</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>0x80045301 FSRM_E_NOT_FOUND</td>
  <td>The specified file group could not be found.</td>
 </tr><tr>
  <td>0x80045308 FSRM_E_INVALID_NAME</td>
  <td>The specified name is not valid.</td>
 </tr><tr>
  <td>0x8004530D FSRM_E_OUT_OF_RANGE</td>
  <td>The content of the name parameter exceeds the maximum length of 4,000 characters.</td>
 </tr><tr>
  <td>0x80070057 E_INVALIDARG</td>
  <td>The fileGroup parameter is NULL.</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>fileGroup</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>Upon successful validation of parameters, the server MUST
perform the following actions or return a nonzero error code.</p><ul><li><p><span><span> 
</span></span>Create a new <a href="f9b05999-4313-400a-bd0e-58d02c9eb118" data-linktype="relative-path">Non-Persisted
File Group Instance (section 3.2.1.3.4.2)</a></p>
</li><li><p><span><span> 
</span></span>Populate its configuration data from the <a href="dcf7066a-8a51-42a7-8cfb-96272896978e" data-linktype="relative-path">Persisted File
Group (section 3.2.1.3.4.1)</a> in the <b>List of Persisted File
Groups</b> with the specified <b>Name</b>.</p>
</li><li><p><span><span> 
</span></span>Set <i>fileGroup</i> to the <b>IFsrmFileGroup</b> interface
pointer of the newly created instance.</p>
</li></ul><p>If a Persisted File Group with the specified <b>Name</b>
property does not exist, the server MUST return FSRM_E_NOT_FOUND.</p></div>