3.1.4.2.47 ApiSetGroupName (Opnum 46)

(Protocol Version 3) The ApiSetGroupName method sets the name of the designated group to the specified name. The non-volatile cluster state associated with the group is updated.

The server MUST fail this method using ERROR_ALREADY_EXISTS if the specified name is already used as either the name or the ID of another group.

The server MUST accept an ApiSetGroupName request for processing only if it is in the read/write state, as specified in section 3.1.1.

The server MUST require that the access level associated with the hGroup context handle is "All" (section 3.1.4).

 error_status_t ApiSetGroupName(
   [in] HGROUP_RPC hGroup,
   [in, string] LPCWSTR lpszGroupName,
   [out] error_status_t *rpc_status
 );

hGroup: An HGROUP_RPC context handle that was obtained in a previous ApiOpenGroup, ApiOpenGroupEx, or ApiCreateGroup method call.

lpszGroupName: A pointer to a Unicode string that contains the new name of the group.

rpc_status: A 32-bit integer used to indicate success or failure. The RPC runtime MUST indicate, by writing to this parameter, whether it succeeded in executing this method on the server. The encoding of the value passed in this parameter MUST conform to encoding for comm_status and fault_status, as specified in Appendix E of [C706].

Return Values: The method MUST return the following error codes for the specified conditions.

Return value/code

Description

0x00000000

ERROR_SUCCESS

Success.

0x00000006

ERROR_INVALID_HANDLE

The hGroup parameter does not represent a valid HGROUP_RPC context handle.

0x0000007B

ERROR_INVALID_NAME

The name pointed to by the lpszGroupName parameter MUST contain at least one character.

0x00001394

ERROR_GROUP_NOT_AVAILABLE

The group represented by the hGroup parameter no longer exists in the non-volatile cluster state.

0x000000B7

ERROR_ALREADY_EXISTS

See the preceding text for when this error can occur.

For any other condition, the server MUST set Status to a value that is not one of the values listed in the preceding table. The client MUST treat all values that are not listed in the preceding table the same, except as specified in section 3.2.4.6.