<div class="content"><p>The EnumFileGroups method returns all the <a href="809180e0-571e-40a0-8067-ffe89cbdcc40#gt_1f828be2-7a1b-4671-b82d-76b974874edc" data-linktype="relative-path">file groups</a> 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>) of the server.</p><dl>
<dd>
<div><pre> [id(FSRM_DISPID_FILEGROUP_MANAGER | 0x03)] HRESULT EnumFileGroups(
   [in, defaultvalue(FsrmEnumOptions_None)] 
     FsrmEnumOptions options,
   [out, retval] IFsrmCommittableCollection** fileGroups
 );
</pre></div>
</dd></dl><p><b>options: </b>Contains the <a href="d01ee30b-4ef8-4eec-8026-3b5a1ccda298" data-linktype="relative-path">FsrmEnumOptions (section 2.2.1.2.5)</a>
to use when enumerating the <i>filegroups</i>.</p><p><b>fileGroups: </b>Pointer to an <b>IFsrmCommittableCollection</b>
interface pointer (section <a href="854116b8-04aa-4342-a308-da8b524ec0d9" data-linktype="relative-path">3.2.4.2.3</a>)
that upon completion SHOULD contain a pointer to every file group on the
server. The caller MUST release the collection 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>
  <p>0x80045311</p>
  <p>FSRM_E_NOT_SUPPORTED</p>
  </td>
  <td>
  <p>This <i>options</i> parameter contains invalid <b>FsrmEnumOptions</b>
  values.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>E_INVALIDARG</p>
  </td>
  <td>
  <p>The <i>fileGroups</i> parameter is NULL.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>Upon receiving this message, the server MUST validate
parameters:</p><ul><li><p><span><span> 
</span></span>If <i>fileGroups</i> is NULL, the server MUST return
E_INVALIDARG.</p>
</li><li><p><span><span> 
</span></span>If <i>options</i> contains <b>FsrmEnumOptions_Asynchronous</b> or
any value other than what is specified in section 2.2.1.2.5, the server MUST
return FSRM_E_NOT_SUPPORTED.</p>
</li></ul><p>Upon successful validation of parameters, the server MUST
perform the following actions:</p><ul><li><p><span><span> 
</span></span>Create a <b>List of Non-Persisted File Group Instance</b>
(section 3.2.1.3).</p>
</li><li><p><span><span> 
</span></span>Populate the newly created instance list with <a href="f9b05999-4313-400a-bd0e-58d02c9eb118" data-linktype="relative-path">Non-Persisted File Group
Instances (section 3.2.1.3.4.2)</a> copied from the <a href="dcf7066a-8a51-42a7-8cfb-96272896978e" data-linktype="relative-path">Persisted File
Groups (section 3.2.1.3.4.1)</a> in the <b>List of Persisted File
Groups</b> (section 3.2.1.3).</p>
</li><li><p><span><span> 
</span></span>Populate <i>fileGroups</i> with the <b>IFsrmFileGroup</b>
interface pointer (section <a href="3cd77924-5b8d-4695-997e-df13e335c67f" data-linktype="relative-path">3.2.4.2.23</a>)
of every Non-Persisted File Group Instance in this <b>List of Non-Persisted
File Group Instance</b>.</p>
</li></ul></div>