<div class="content"><p>The EnableDisable method enables or disables the management
of a specified type of <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_c18a91a3-689f-4e5e-9a91-c7b8f5402c5e" data-linktype="relative-path">WSRM
configuration</a>.</p><dl>
<dd>
<div><pre> [id(4), helpstring(&#34;method EnableDisable&#34;)] HRESULT EnableDisable(
   [in] BOOL bEnableDisable,
   [in] CONFIGTYPE enumConfigType
 );
</pre></div>
</dd></dl><p><b>bEnableDisable: </b>A Boolean value that specifies
whether to enable or disable the management of the WSRM configuration. The type
of configuration is determined by the value of the <i>enumConfigType</i>
parameter.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>FALSE</p>
  <p>0x00000000</p>
  </td>
  <td>
  <p>Management of the WSRM configuration MUST be disabled.</p>
  </td>
 </tr><tr>
  <td>
  <p>TRUE</p>
  <p>0x00000001</p>
  </td>
  <td>
  <p>Management of the WSRM configuration MUST be enabled.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>enumConfigType: </b>A <a href="c7d0ac7a-d7f4-492c-93cf-df63e3970229" data-linktype="relative-path">CONFIGTYPE</a> enumeration
(section 2.2.3.1) value that specifies the type of WSRM configuration to enable
or disable.</p><dl>
<dd>
<p>If this parameter value is outside the range of the
CONFIGTYPE enumeration, <b>E_INVALIDARG</b> MUST be returned.</p>
</dd></dl><p><b>Return Values: </b>This method returns 0x00000000
for success or a negative <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_799103ab-b3cb-4eab-8c55-322821b2b235" data-linktype="relative-path">HRESULT</a>
value (in the following table or in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/705fb797-2175-4a90-b5a3-3918024b10b8" data-linktype="relative-path">2.1.1</a>)
if an error occurs.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  <p>S_OK</p>
  </td>
  <td>
  <p>Operation successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070032</p>
  <p>ERROR_NOT_SUPPORTED</p>
  </td>
  <td>
  <p>The requested action is not supported.<a id="Appendix_A_Target_75"></a><a aria-label="Product behavior note 75" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_75" data-linktype="relative-path">&lt;75&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>E_INVALIDARG</p>
  </td>
  <td>
  <p>One or more arguments are invalid.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x81FF006D</p>
  <p>WRM_WARNING_CALENDARING_ALREADY_ENABLED</p>
  </td>
  <td>
  <p>The <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_1517eb9b-d2b2-48f0-bf23-bde76923ed30" data-linktype="relative-path">management
  service</a> is already in calendar mode.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x81FF0196</p>
  <p>WRM_WARNING_NOTIFICATION_ALREADY_DISABLED</p>
  </td>
  <td>
  <p>Notification is already disabled.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x81FF0197</p>
  <p>WRM_WARNING_NOTIFICATION_ALREADY_ENABLED</p>
  </td>
  <td>
  <p>Notification is already enabled.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x81FF01F4</p>
  <p>WRM_WARNING_ACCOUNTING_ALREADY_DISABLED</p>
  </td>
  <td>
  <p><a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_1156c8ef-4d49-462b-9f76-aebcb6c57011" data-linktype="relative-path">Accounting</a>
  is already disabled.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x81FF01F5</p>
  <p>WRM_WARNING_ACCOUNTING_ALREADY_ENABLED</p>
  </td>
  <td>
  <p>Accounting is already enabled.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF007E</p>
  <p>WRM_ERR_ACCENABLED_UNDER_GROUPPOLICY</p>
  </td>
  <td>
  <p>The accounting setting is currently configured under <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_defe8c22-1365-4e5e-abf7-46ad112d3bda" data-linktype="relative-path">Group Policy</a> and cannot
  be modified.<a id="Appendix_A_Target_76"></a><a aria-label="Product behavior note 76" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_76" data-linktype="relative-path">&lt;76&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0191</p>
  <p>WRM_ERR_SMTPSERVERNAME_CANNOT_BE_NULL</p>
  </td>
  <td>
  <p>Both the <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_0678be67-e739-4e33-97fe-2b03b903a379" data-linktype="relative-path">Simple Mail Transfer Protocol
  (SMTP)</a> server and email name are required in order to enable
  notification.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0193</p>
  <p>WRM_ERR_EVENTLIST_CANNOT_BE_NULL</p>
  </td>
  <td>
  <p>Notification requires at least one event.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF01F8</p>
  <p>WRM_ERR_ACCOUNTING_NOT_CONFIGURED_PROPERLY</p>
  </td>
  <td>
  <p>Accounting has not been configured properly. The <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_00ade642-0391-435b-980a-8fb488ef1b68" data-linktype="relative-path">accounting server</a> might
  not be present or access might be denied.<a id="Appendix_A_Target_77"></a><a aria-label="Product behavior note 77" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_77" data-linktype="relative-path">&lt;77&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF020B</p>
  <p>WRM_ERR_REMOTE_SERVICE_NOT_STARTED</p>
  </td>
  <td>
  <p>Connection to the remote server could not be
  established because the <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_d83f4163-fac6-4d2e-b143-a7e0420b6e4b" data-linktype="relative-path">WSRM
  management service</a> has not been started on the remote server.<a id="Appendix_A_Target_78"></a><a aria-label="Product behavior note 78" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_78" data-linktype="relative-path">&lt;78&gt;</a></p>
  </td>
 </tr></tbody></table>
</dd></dl><p>Additional <a href="38d3fffd-48ad-4e02-a7ce-b13da6304c80" data-linktype="relative-path">IWRMConfig</a> interface
methods are specified in section 3.2.4.5.</p></div>