IFPCSystemPolicy::CreateConfigurationGroupInstance method

Applies to: desktop apps only

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


HRESULT CreateConfigurationGroupInstance(
  [in]   FpcSystemPolicyConfigGroupEnum Service,
  [out]  IFPCSystemPolicyConfigGroup **ppConfigGroup
FPCSystemPolicy.CreateConfigurationGroupInstance( _
  ByVal Service As FpcSystemPolicyConfigGroupEnum, _
  ByRef ppConfigGroup As IFPCSystemPolicyConfigGroup _
) As FPCSystemPolicyConfigGroup


Return value


This method can return one of the following:

  • S_OK, indicating that the operation succeeded.
  • An error code, indicating that the operation failed. In this case, the [out] parameter returned is a null object.


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.


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.


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)


Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)


Forefront Threat Management Gateway (TMG) 2010





See also




Build date: 7/12/2010