3.2.4.4.3 ModifyCalendar (Opnum 9)

The ModifyCalendar method modifies an existing calendar event.

 [id(3), helpstring("method ModifyCalendar")] HRESULT ModifyCalendar(
   [in] BSTR bstrCalendarXML,
   [in] BOOL bOverwrite,
   [in] BOOL bChangeActivePolicy
 );

bstrCalendarXML: A string that specifies the calendar event, in the form of a Calendar element (section 2.2.5.7).

If this parameter is NULL, E_INVALIDARG MUST be returned.

bOverwrite: A Boolean value that specifies whether to ignore the timestamp of the specified calendar event 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 calendar event 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 calendar event 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.<59>

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.<60>

0xC1FF0260

WRM_ERR_CAL_INTERVAL_TOO_LONG

The calendar recurrence interval value MUST be from 1 to 999.

0xC1FF0263

WRM_ERR_CAL_INVALID_MONTH

The month value MUST be from 1 to 12.

0xC1FF0264

WRM_ERR_CAL_INVALID_MONTHDAY

The days of the month MUST have a value from 1 to 31.

0xC1FF0265

WRM_ERR_CAL_INVALID_YEARDAY

The day of the year cannot be zero and SHOULD NOT exceed the number of days in the selected year.<61>

0xC1FF0266

WRM_ERR_CAL_INVALID_WEEKNO

The weeks of the year MUST have a value from 1 to 53.

0xC1FF0267

WRM_ERR_CAL_INVALID_SETPOS

The value of the monthly instance of a day of the week is invalid.

0xC1FF0269

WRM_ERR_CAL_SCHEDULE_NAME_INVALID

The specified schedule name does not exist.

0xC1FF0275

WRM_ERR_CAL_INVALID_DURATION

The specified calendar event duration is invalid. Specify a duration using the format dd:hh:mm.

Additional IWRMCalendar interface methods are specified in section 3.2.4.4.