3.2.4.4.11 RenameSchedule (Opnum 17)

The RenameSchedule method renames a specified schedule object. If the schedule object is being referenced by some calendar object, then the calendar object is also updated with the new name.

 [id(11), helpstring("method RenameSchedule")] HRESULT RenameSchedule(
   [in] BSTR bstrOldScheduleName,
   [in] BSTR bstrNewScheduleName
 );

bstrOldScheduleName: A string that specifies the current name of the schedule object to be renamed.

If this parameter is NULL, E_INVALIDARG MUST be returned.

bstrNewScheduleName: A string that specifies the new name of the schedule object.

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.

0xC1FF006F

WRM_ERR_ID_VALUE

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

 \   / ? * | : < > " , ;.

0xC1FF0270

WRM_ERR_CAL_DUPLICATE_SCHEDULE

The new schedule name is already taken by an existing schedule object.

0xC1FF0271

WRM_ERR_CAL_UNKNOWN_SCHEDULE

The specified schedule object does not exist.

0xC1FF0273

WRM_ERR_CAL_SCHEDULE_NAME_TOOLONG

The schedule object name has exceeded an implementation-defined limit.<68>

Additional IWRMCalendar interface methods are specified in section 3.2.4.4.