Set Method of the IFPCSchedule Interface

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

[C++]

Syntax

HRESULT Set(
  [in]  FpcScheduleDays Day,
  [in]  FpcScheduleHours Hour
);

Parameters

Day

Value from the FpcScheduleDays enumerated type that specifies a day or the entire week. The possible values are fpcALL_WEEK, fpcSUN, fpcMON, and so on.

Hour

Value from the FpcScheduleHours enumerated type that specifies an hour or hours. The possible values are fpcALL_DAY, fpcAM_0, fpcAM_1, fpcPM_1, fpcPM_2, and so on.

Return Value

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

Example Code

For a C++ code example that shows how to create a new schedule and to use this method to configure the new schedule to apply to all hours on all days, see Adding a Schedule Using C++.
[Visual Basic]

Syntax

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

Parameters

Day

Value from the FpcScheduleDays enumerated type that specifies a day or the entire week. The possible values are fpcALL_WEEK, fpcSUN, fpcMON, and so on.

Hour

Value from the FpcScheduleHours enumerated type that specifies an hour or hours. The possible values are fpcALL_DAY, fpcAM_0, fpcAM_1, fpcPM_1, fpcPM_2, and so on.

Return Value

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

Example Code

The following line adds "3 A.M. on Sunday" to the schedule:

mySchedule.Set fpcSUN, fpcAM_3

The following line adds "6 A.M. on every day" to the schedule:

mySchedule.Set fpcALL_WEEK, fpcAM_6

The following line adds all of Monday to the schedule:

mySchedule.Set fpcMON, fpcALL_DAY

The following line adds all hours of the week to the schedule:

mySchedule.Set fpcALL_WEEK, fpcALL_DAY
For a Visual Basic code example that shows how to create a new schedule and to use this method to configure the new schedule to apply to all hours on all days, see Adding a Schedule Using Visual Basic.

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 fpc2_PM is the one-hour time block between 2:00 P.M. (14:00) and 3:00 P.M. (15:00).

Requirements

Client Requires Windows Vista or Windows XP.
Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
IDL

Declared in Msfpccom.idl.

DLL

Requires Msfpccom.dll.

See Also

FPCSchedule
IsSet
UnSet


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.

508 Resource Limit Is Reached

Resource Limit Is Reached

The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.