3.2.4.5.2 SetConfig (Opnum 8)

The SetConfig method sets WSRM configuration information concerning accounting and notifications.

 [id(2), helpstring("method SetConfig")] HRESULT SetConfig(
   [in] BSTR bstrConfigInfo,
   [in] CONFIGTYPE enumConfigType
 );

bstrConfigInfo: A string that contains WSRM configuration information. The type of information is determined by the value of the enumConfigType parameter.

If this parameter is NULL, E_INVALIDARG MUST be returned.

enumConfigType: A CONFIGTYPE enumeration (section 2.2.3.1) value that specifies the type of WSRM configuration information to set.

Setting calendar information is not supported. If this parameter is set to CONFIGTYPE_CALENDARING,  ERROR_NOT_SUPPORTED SHOULD be returned.

Value

Meaning

CONFIGTYPE_ACCOUNTING

1

The WSRM configuration information is in the form of an AccountingConfigInfo element (section 2.2.5.2).

CONFIGTYPE_NOTIFICATION

2

The WSRM configuration information is in the form of an NotificationConfigInfo element (section 2.2.5.19).

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.

0x80070005

ERROR_ACCESS_DENIED

Access is denied.

0x80070032

ERROR_NOT_SUPPORTED

The requested action is not supported.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0xC1FF006E

WRM_ERR_TOO_LONG_CONFIG_VALUE

One or more specified values have exceeded an implementation-defined limit.<72>

0xC1FF0070

WRM_ERR_TAGS_NOT_IN_ORDER

The XML data that is maintained by the management service is invalid or cannot be processed.<73>

0xC1FF0190

WRM_ERR_INVALID_NTFY_ENABLE

The notification-enabled value MUST be Boolean (section 2.2.1.2).

0xC1FF0194

WRM_ERR_INVALID_EVENTLIST

The notification event list format is invalid.

0xC1FF01F6

WRM_ERR_INVALID_ACC_ENABLE

The accounting-enabled value MUST be Boolean (section 2.2.1.2).

0xC1FF01F9

WRM_ERR_ACC_INVALID_DUMPING_INTERVAL

The logging interval for accounting is invalid. The interval MUST be between 2 and 60,000 minutes, inclusive.

Note When the CONFIGTYPE_ACCOUNTING option is used, an accounting client SHOULD call SetClientPermissions (section 3.2.4.3.14) prior to SetConfig in order to obtain authorization to modify an accounting database on a remote WSRM server. If a client does not have permission, ERROR_ACCESS_DENIED SHOULD be returned.<74>

Additional IWRMConfig interface methods are specified in section 3.2.4.5.