IFPCPersist::GetServiceRestartMask method
Applies to: desktop apps only
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.
Syntax
HRESULT GetServiceRestartMask(
[out] long *plServiceRestartMask
);
FPCPersist.GetServiceRestartMask( _
ByRef plServiceRestartMask As long _
) As Long
Parameters
- plServiceRestartMask [out]
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
C++
This method can return one of the following:
- S_OK, indicating that the operation succeeded.
- An error code, indicating that the operation failed.
VB
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
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only) |
Version |
Forefront Threat Management Gateway (TMG) 2010 |
IDL |
Msfpccom.idl |
DLL |
Msfpccom.dll |
See also
Build date: 7/12/2010