3.2.4.4.4 DeleteCalendar (Opnum 10)

The DeleteCalendar method deletes a specified calendar event.

 [id(4), helpstring("method DeleteCalendar")] HRESULT DeleteCalendar(
   [in] BSTR bstrCalendarName,
   [in] BOOL bChangeActivePolicy
 );

bstrCalendarName: A string that specifies the name of the calendar event.

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

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.

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:

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

0xC1FF0259

WRM_ERR_CAL_UNKNOWN_CALENDAR

The specified calendar event does not exist.

Additional IWRMCalendar interface methods are specified in section 3.2.4.4.