<div class="content" name="EnumModuleDefinitions" uuid="b1a80d41-3eea-4034-b9a5-96ca119fdbcd"><p>The EnumModuleDefinitions method returns all the <i>moduleDefinitions</i>
from the <b>List of Persisted Module Definitions</b> (section <a href="a4da1447-54a5-4b37-b135-bfa7481aed1c" data-linktype="relative-path">3.2.1.6</a>) on the server
that have the specified <i>moduleType</i>.</p><dl>
<dd>
<div><pre> [id(FSRM_DISPID_CLASSIFICATION_MANAGER | 0x07)] HRESULT EnumModuleDefinitions(
   [in] FsrmPipelineModuleType moduleType,
   [in, defaultvalue(FsrmEnumOptions_None)] 
     FsrmEnumOptions options,
   [out, retval] IFsrmCollection** moduleDefinitions
 );
</pre></div>
</dd></dl><p><b>moduleType: </b>Contains the <a href="4688adcd-859d-4ef4-bf52-bcfe0367bd68" data-linktype="relative-path">FsrmPipelineModuleType (section 2.2.1.2.12)</a>
of the modules to get.</p><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>moduleDefinitions</i>.</p><p><b>moduleDefinitions: </b>Pointer to an <b>IFsrmCollection</b>
interface pointer (section <a href="171d3b3c-0f4d-40b9-8f48-0e97f9ff17be" data-linktype="relative-path">3.2.4.2.1</a>)
that upon completion contains pointers to every module definition on the server
that has the specified <i>moduleType</i>. A caller MUST release the collection
received when the caller 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>0x80045311 FSRM_E_NOT_SUPPORTED</td>
  <td>The options parameter does not contain a valid FsrmEnumOptions (section 2.2.1.2.5) value.</td>
 </tr><tr>
  <td>0x80070057 E_INVALIDARG</td>
  <td>This code is returned for the following reasons:  The moduleType parameter is not a valid value. If the moduleType is FsrmPipelineModuleType_Unknown, the parameter MUST be considered an invalid value.  The moduleDefinitions 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>If <i>moduleDefinitions</i> is NULL, server MUST return
E_INVALIDARG.</p>
</li><li><p><span><span> 
</span></span>If <i>moduleType</i> is <b>FsrmPipelineModuleType_Unknown</b> or
any value other than what is specified in section 2.2.1.2.12, 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 Module Definition Instances</b>
(section 3.2.1.6).</p>
</li><li><p><span><span> 
</span></span>Populate it with <a href="daf23529-163e-44d5-819b-6ebdfe2850d3" data-linktype="relative-path">Non-Persisted Module
Definition Instances (section 3.2.1.6.2.2)</a> copied from the <a href="290f855d-d55d-4b16-8617-255931e1be9d" data-linktype="relative-path">Persisted Module
Definitions (section 3.2.1.6.2.1)</a> in the <b>List of Persisted Module
Definitions</b> where each copied instance&#39;s <b>Module Type</b> is equivalent
to <i>moduleType</i>.</p>
</li><li><p><span><span> 
</span></span>Populate <i>moduleDefinitions</i> with the <b>IFsrmPipelineModuleDefinition</b>
interface pointer (section <a href="7b7cf0e7-75c5-40b4-a418-de1259a62c94" data-linktype="relative-path">3.2.4.2.43</a>)
of every Non-Persisted Module Definition Instance in this newly created <b>List
of Non-Persisted Module Definition Instances</b>.</p>
</li></ul></div>