GetServiceRestartMask Method of the IFPCPersist Interface

The GetServiceRestartMask method retrieves a 32-bit bitmask of the FpcServices enumerated type that specifies which services need to be restarted for currently unsaved changes to take effect.

C++

Syntax

HRESULT GetServiceRestartMask(
  [out]  long* plServiceRestartMask
);

Parameters

  • plServiceRestartMask
    Pointer to a 32-bit integer that is set on return to a bitmask that specifies which services need to be restarted for currently unsaved changes to take effect.

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.

Visual Basic

Syntax

Function GetServiceRestartMask() As Long

Parameters

This method has no parameters.

Return Value

If successful, this method returns a 32-bit bitmask that specifies which services need to be restarted for currently unsaved changes to take effect. Otherwise, an error is raised that can be intercepted by using an error handler.

Remarks

The bitmask retrieved specifies the services that need to be restarted to apply any unsaved changes made to the object on which the method was called or any unsaved changes made to any of its subobjects.

The values defined in the FpcServices enumeration can be used to decrypt the bitmask and determine which services need to be restarted. Bit 0 corresponds to the Microsoft Firewall service, and bit 1 corresponds to the Microsoft Forefront TMG Job Scheduler service.

All unsaved changes can be applied with restarting of the required services by using either of the following techniques:

  • Calling the Save method with the fResetRequiredServices parameter set to True (VARIANT_TRUE in C++) on an object that contains all the other objects with configuration changes as subobjects.
  • Calling Save with fResetRequiredServices set to False (VARIANT_FALSE in C++) on an object that contains the objects with configuration changes as subobjects and then calling the RestartServices method on the FPCArray object (IFPCArray interface in C++) with the applicable bitmask. Alternatively, services can be stopped and started in Forefront TMG Management, as described in the Forefront TMG product documentation.

Requirements

Client Requires Windows 7 or Windows Vista.
Server Requires Windows Server 2008 R2 or Windows Server 2008 x64 Edition with SP2.
Version Requires Forefront Threat Management Gateway (TMG) 2010.
IDL

Declared in Msfpccom.idl.

DLL

Requires Msfpccom.dll.

See Also

FPCPersist

Send comments about this topic to Microsoft

Build date: 6/30/2010