3.2.4.3.12 SetAccountingClientStatus (Opnum 18)

The SetAccountingClientStatus method sets the status of accounting functionality of servers that are in the remote accounting client role. Status of accounting functionality is controlled by the Enabled attribute in bstrClientIds XML. If the Enabled attribute in the bstrClientIds XML is specified as "true", the accounting functionality for the WSRM server, whose name is specified as the value of the respective AccountingClient node, is enabled; otherwise, if it is specified as "false", the accounting functionality is disabled. The DumpAccountingData method does not store accounting data in the database if the status of the accounting functionality of the respective server is disabled using the SetAccountingClientStatus method.<53>

 [id(12), helpstring("method SetAccountingClientStatus")] HRESULT SetAccountingClientStatus(
   [in] BSTR bstrClientIds
 );

bstrClientIds: A string that specifies the machine names of all accounting clients, in the form of an AccountingClientList element (section 2.2.5.1). For an example, see section 4.2.1. The value of the Enabled attribute specifies the accounting functionality status of the accounting clients.

If this parameter is NULL, 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.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0xC1FF020F

WRM_ERR_SETCLIENTSTATUS_XML_INVALID

The operation failed. XML data provided is invalid.

0xC1FF0210

WRM_ERR_CLIENTSTATUS_ACC_OFF

Accounting is currently turned off. There are no clients logging data to this machine.

0xC1FF0211

WRM_ERR_CLIENTSTATUS_ACC_REMOTE

Accounting is currently being done on a remote machine. There are no clients logging data to this machine.

Note Remote accounting is not supported in a workgroup environment.

Additional IWRMAccounting interface methods are specified in section 3.2.4.3.