3.2.4.3.14 SetClientPermissions (Opnum 20)

The SetClientPermissions method adds or removes a specified client for remote accounting on a server and makes the required changes for DCOM permissions; that is, it adds the machine account of the accounting client to the Distributed COM Users group (see [MS-SAMR] section 3.1.4.2) of the accounting server.

 [id(14), helpstring("method SetClientPermissions")] HRESULT SetClientPermissions(
   [in] BSTR bstrClientId,
   [in] BOOL fAddPermissions
 );

bstrClientId: A string that identifies the client machine name whose account is to be added or removed.

fAddPermissions: TRUE to add and FALSE to remove.

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.

0xC1FF0213

WRM_ERR_INVALID_DBSERVER_NAME

Could not establish a connection to the database server. Either the server name is invalid or the machine executing this method does not have permission to perform an account lookup.

0xC1FF0214

WRM_ERR_PERMISSION_GRANT_UNSUCCESSFUL

Could not grant permissions to the current machine to log data remotely.

This error is returned when a server machine denies access to a requesting machine.

It is possible for multiple WSRM servers to have a common accounting server.

Note Remote accounting is not supported in a workgroup environment.

Additional IWRMAccounting interface methods are specified in section 3.2.4.3.