CreateConfigurationGroupInstance Method of the IFPCSystemPolicy Interface

The CreateConfigurationGroupInstance method creates an instance of the FPCSystemPolicyConfigGroup object for the system policy configuration group requested and returns a reference to it.

[C++]

Syntax

HRESULT CreateConfigurationGroupInstance(
  [in]   FpcSystemPolicyConfigGroupEnum Service,
  [out]  IFPCSystemPolicyConfigGroup** ppConfigGroup
);

Parameters

Service

Value from the FpcSystemPolicyConfigGroupEnum enumerated type that indicates a specific configuration group.

ppConfigGroup

Address of an interface pointer that on return points to the instance of the IFPCSystemPolicyConfigGroup interface created.

Return Value

This method can return one of the following:

[Visual Basic]

Syntax

Function CreateConfigurationGroupInstance( _
  ByVal Service As FpcSystemPolicyConfigGroupEnum _
) As FPCSystemPolicyConfigGroup

Parameters

Service

Value from the FpcSystemPolicyConfigGroupEnum enumerated type that indicates a specific configuration group.

Return Value

This method returns a reference to the instance of the FPCSystemPolicyConfigGroup object created if successful. Otherwise, an error is raised that can be intercepted by using an error handler.

Example Code

This VBScript code example creates an instance of the FPCSystemPolicyConfigGroup object for the Scheduled Download Jobs system policy configuration group. This instance can then be used to enable or disable the system policy rules that belong to the Scheduled Download Jobs configuration group.
' Define the enumeration value needed.
Const fpcSystemPolicyConfigGroup_Prefetcher = 12
' Create the root object.
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the other objects needed.
Dim isaArray	' An FPCArray object
Dim configGroup   ' An FPCSystemPolicyConfigGroup object
' Get a reference to the array object.
Set isaArray = root.GetContainingArray()
' Create an instance of the sytem policy configuration
' group object for the Job Scheduler service.
Set configGroup = isaArray.SystemPolicy.CreateConfigurationGroupInstance(fpcSystemPolicyConfigGroup_Prefetcher)

Remarks

Each new instance of the FPCSystemPolicyConfigGroup object (IFPCSystemPolicyConfigGroup interface in C++) is created with the last saved properties of the rules belonging to the applicable configuration group.

Changes made in a configuration group can be saved only by calling the Save method on the FPCSystemPolicyConfigGroup object (IFPCSystemPolicyConfigGroup interface in C++). They are not written to persistent storage when the FPCSystemPolicy object or any object above it in the Forefront TMG object hierarchy is saved.

The Enabled property of an instance of the FPCSystemPolicyConfigGroup object (IFPCSystemPolicyConfigGroup interface in C++) that is created with the Service parameter set to fpcSystemPolicyConfigGroup_VPN is read-only, and the applicable system policy rules cannot be enabled or disabled through this property.

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

FPCSystemPolicy


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.