3.2.4.5.4 EnableDisable (Opnum 10)

The EnableDisable method enables or disables the management of a specified type of WSRM configuration.

 [id(4), helpstring("method EnableDisable")] HRESULT EnableDisable(
   [in] BOOL bEnableDisable,
   [in] CONFIGTYPE enumConfigType
 );

bEnableDisable: 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 enumConfigType parameter.

Value

Meaning

FALSE

0x00000000

Management of the WSRM configuration MUST be disabled.

TRUE

0x00000001

Management of the WSRM configuration MUST be enabled.

enumConfigType: A CONFIGTYPE enumeration (section 2.2.3.1) value that specifies the type of WSRM configuration to enable or disable.

If this parameter value is outside the range of the CONFIGTYPE enumeration, E_INVALIDARG MUST be returned.

Return Values: This method returns 0x00000000 for success or a negative HRESULT value (in the following table or in [MS-ERREF] section 2.1.1) if an error occurs.

Return value/code

Description

0x00000000

S_OK

Operation successful.

0x80070032

ERROR_NOT_SUPPORTED

The requested action is not supported.<75>

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0x81FF006D

WRM_WARNING_CALENDARING_ALREADY_ENABLED

The management service is already in calendar mode.

0x81FF0196

WRM_WARNING_NOTIFICATION_ALREADY_DISABLED

Notification is already disabled.

0x81FF0197

WRM_WARNING_NOTIFICATION_ALREADY_ENABLED

Notification is already enabled.

0x81FF01F4

WRM_WARNING_ACCOUNTING_ALREADY_DISABLED

Accounting is already disabled.

0x81FF01F5

WRM_WARNING_ACCOUNTING_ALREADY_ENABLED

Accounting is already enabled.

0xC1FF007E

WRM_ERR_ACCENABLED_UNDER_GROUPPOLICY

The accounting setting is currently configured under Group Policy and cannot be modified.<76>

0xC1FF0191

WRM_ERR_SMTPSERVERNAME_CANNOT_BE_NULL

Both the Simple Mail Transfer Protocol (SMTP) server and email name are required in order to enable notification.

0xC1FF0193

WRM_ERR_EVENTLIST_CANNOT_BE_NULL

Notification requires at least one event.

0xC1FF01F8

WRM_ERR_ACCOUNTING_NOT_CONFIGURED_PROPERLY

Accounting has not been configured properly. The accounting server might not be present or access might be denied.<77>

0xC1FF020B

WRM_ERR_REMOTE_SERVICE_NOT_STARTED

Connection to the remote server could not be established because the WSRM management service has not been started on the remote server.<78>

Additional IWRMConfig interface methods are specified in section 3.2.4.5.