3.2.4.4.9 ModifySchedule (Opnum 15)

The ModifySchedule method modifies the specified schedule of the calendar.

 [id(9), helpstring("method ModifySchedule")] HRESULT ModifySchedule(
   [in] BSTR bstrScheduleXML,
   [in] BOOL bOverwrite,
   [in] BOOL bChangeActivePolicy
 );

bstrScheduleXML: A string that specifies the modified schedule, in the form of a Schedule element (section 2.2.5.26). Sample XML is provided in Schedule Example (section 4.2.22).

If this parameter is NULL, E_INVALIDARG MUST be returned.

bOverwrite: A Boolean value that specifies whether to ignore the timestamp of the specified schedule object when validating.

A timestamp MUST be defined inside a common node at the root level of an XML element, as shown in the Calendar example (section 4.2.6). The format of a timestamp is specified in section 2.2.1.4.

Value

Meaning

FALSE

0x00000000

The timestamp of the new schedule object MUST specify a time that is later than or equal to the timestamp of any modifications made to a calendar or schedule object on the server. Otherwise, the modification SHOULD fail, and WRM_ERR_OLD_INFORMATION SHOULD be returned.

TRUE

0x00000001

The schedule object is validated and modified without checking the timestamp.

bChangeActivePolicy: A Boolean value that specifies whether the configuration changes made by this method call SHOULD change the current active policy, if applicable, of the system.<66>

Value

Meaning

FALSE

0x00000000

The current active policy of the system SHOULD NOT be changed by the method call.

TRUE

0x00000001

If applicable, the current active policy of the system SHOULD be changed by the method call.

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.

0xC1FF0069

WRM_ERR_OLD_INFORMATION

The XML timestamp is out of date.

0xC1FF0070

WRM_ERR_TAGS_NOT_IN_ORDER

The XML data that is maintained by the management service is invalid or cannot be processed.<67>

0xC1FF0271

WRM_ERR_CAL_UNKNOWN_SCHEDULE

The specified schedule object does not exist.

Additional IWRMCalendar interface methods are specified in section 3.2.4.4.