IRecurrencePattern::put_Duration

Send Feedback

The Duration property gets or sets the length of a recurring appointment. It is the difference between PIMPR_RECURRING_ENDTIME and PIMPR_RECURRING_STARTTIME.

To set the value of the Duration property, call the property method described here.

To get the value of the Duration property, see the IRecurrencePattern::get_Duration property method.

Syntax

HRESULT put_Duration(
  long lDuration
);

Parameters

  • lDuration
    [in] An integer value indicating the duration of the recurrence pattern.

Return Values

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    The method completed successfully.

Remarks

Recurrence duration applies to Appointment items only. It is the difference between PIMPR_RECURRING_ENDTIME and PIMPR_RECURRING_STARTTIME.

If you do not set the duration, Outlook Mobile sets it from information contained in the Appointment item.

The Duration value is ignored if you set both StartTime and EndTime. If you set only one, Outlook Mobile uses the Duration value to calculate the other.

The Duration value cannot be longer than 31 days.

The Start and End times for recurring Appointments are set in terms of the Timezone property (PIMPR_TIMEZONE), but the Start and End times for individual Appointments are set and read in terms of the local (Windows Mobile–based device's) Timezone. For example, a recurring Appointment set to recur at noon London time, would occur at 4:00 AM Pacific time.

When you change a Recurrence Pattern's Duration property, the Duration property of each Appointment item that is associated with this Recurrence Pattern also changes. For example, you might use IRecurrencePattern::put_Duration if you wanted to change the duration of a weekly meeting from 60 minutes, to 30 minutes.

Requirements

Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: pimstore.h
Library: pimstore.lib

See Also

How to: Create a Recurring Appointment | IRecurrencePattern::get_Duration | IRecurrencePattern | Pocket Outlook Object Model API Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.