3.2.4.4.2 CreateCalendar (Opnum 8)

The CreateCalendar method creates a new calendar event.

 [id(2), helpstring("method CreateCalendar")] HRESULT CreateCalendar(
   [in] BSTR bstrCalendarXML,
   [in] BOOL bChangeActivePolicy
 );

bstrCalendarXML: A string that specifies the new calendar event, in the form of a Calendar element (section 2.2.5.7). For an example, see Calendar Example (section 4.2.8).

If this parameter is NULL, E_INVALIDARG MUST be returned.

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

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.

0xC1FF0070

WRM_ERR_TAGS_NOT_IN_ORDER

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

0xC1FF0258

WRM_ERR_CAL_DUPLICATE_CALENDAR

A calendar event with the specified name already exists.

0xC1FF025B

WRM_ERR_CAL_MAX_CAL_EXCEEDED

The number of calendar events that exist at one time has exceeded an implementation-defined limit.<58>

Additional IWRMCalendar interface methods are specified in section 3.2.4.4.