3.2.4.9.3 RefreshRemoteSessionWeights (Opnum 9)

The RefreshRemoteSessionWeights method forces reallocation of CPU quotas for the sessions run by users according to the category type specified in bstrTargetUserSessions.

 [id(3), helpstring("method RefreshRemoteSessionWeights")] HRESULT RefreshRemoteSessionWeights(
   [in] BSTR bstrTaregetUserSessions,
   [in] BOOL bUpdateAll
 );

bstrTargetUserSessions: A string that specifies a list of user categories, in the format of a ConfigurationFiles element (section 2.2.5.13).

bUpdateAll: A Boolean value that specifies whether to recursively delete all instances of the specified machine group.

Value

Meaning

FALSE

0x00000000

Only the CPU quotas for users specified in bstrTargetUserSessions are reallocated according to their category type.

TRUE

0x00000001

The CPU quotas for all remote sessions are reallocated according to the category type specified in bstrTargetUserSessions.

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

0xC1FF0070

WRM_ERR_TAGS_NOT_IN_ORDER

The XML data is invalid or cannot be processed.

0xC1FF006F

WRM_ERR_ID_VALUE

The specified name contains characters that are invalid. The name cannot start with a hyphen (-), cannot contain spaces, and cannot contain any of the following characters:

\ / ? * | : < > " , ;

0x00000000

S_OK

Operation successful.

Additional IWRMRemoteSessionMgmt interface methods are specified in section 3.2.4.9.