Microsoft Internet Security and Acceleration Server 2004 SDK

IFPCSchedule::Set[C++]

FPCSchedule.Set [Visual Basic]

[C++]

The Set method adds a set of hours to the schedule.

HRESULT Set(
  FpcScheduleDays Day,
  FpcScheduleHours Hour
);

Parameters

Day
[in] Value from the FpcScheduleDays enumerated type that specifies a day or the entire week. It can be ALL_WEEK, SUN, MON, and so on.
Hour
[in] Value from the FpcScheduleHours enumerated type that specifies an hour or hours. It can be ALL_DAY, AM_0, AM_1, PM_1, PM_2, and so on.

Return Values

This method returns S_OK if the call is successful; otherwise, it returns an error code.

Remarks

The hour blocks defined by a schedule include the specified time and the one-hour block following that time. For example, the hour designated by 2_PM is the one-hour time block between 2:00 P.M. (14:00) and 3:00 P.M. (15:00).

Example Code

The following example adds "3 A.M. on Sunday" to the set:

Set(SUN, AM_3)

The following example adds "6 A.M. on every day" to the set:

Set(ALL_WEEK, AM_6)

The following example adds all of Monday to the set:

Set(MON, ALL_DAY)

The following example adds all hours of the week to the set:

Set(ALL_WEEK, ALL_DAY)
[Visual Basic]

The Set method adds a set of hours to the schedule.

Sub Set( _
  ByVal Day As FpcScheduleDays, _
  ByVal Hour As FpcScheduleHours _
)

Parameters

Day
[in] Value from the FpcScheduleDays enumerated type that specifies a day or the entire week. It can be ALL_WEEK, SUN, MON, and so on.
Hour
[in] Value from the FpcScheduleHours enumerated type that specifies an hour or hours. It can be ALL_DAY, AM_0, AM_1, PM_1, PM_2, and so on.

Return Values

This method has no return values. If the call is unsuccessful, an error is raised that can be intercepted by using an error handler.

Remarks

The hour blocks defined by a schedule include the specified time and the one-hour block following that time. For example, the hour designated by 2_PM is the one-hour time block between 2:00 P.M. (14:00) and 3:00 P.M. (15:00).

Example Code

The following example adds "3 A.M. on Sunday" to the set:

Set(SUN, AM_3)

The following example adds "6 A.M. on every day" to the set:

Set(ALL_WEEK, AM_6)

The following example adds all of Monday to the set:

Set(MON, ALL_DAY)

The following example adds all hours of the week to the set:

Set(ALL_WEEK, ALL_DAY)

Requirements

Server: Requires Windows Server 2003 or Windows 2000.
Version: Requires Internet Security and Acceleration Server 2004.
Header: Declared in Msfpccom.idl.
Library: Use Microsoft Internet Security and Acceleration Server 2004 Administration Library.

See Also

FPCSchedule, IsSet, UnSet