GetContainingServer Method of the IFPC Interface

The GetContainingServer method retrieves the FPCServer object (IFPCServer interface in C++) that represents the current Forefront TMG computer.

Note  This method is only relevant when executed on a computer which runs the Microsoft Firewall service.



HRESULT GetContainingServer(
  [out]  IFPCServer** ppItem



Address of an interface pointer that on return points to the IFPCServer interface that represents the current Forefront TMG computer.

Return Value

This method can return one of the following:

[Visual Basic]


Function GetContainingServer() As FPCServer


This method has no parameters.

Return Value

This method returns a reference to an FPCServer object if successful. Otherwise, an error is raised that can be intercepted by using an error handler. In particular, an ERROR_FILE_NOT_FOUND is raised if the FPCServer object could not be found because the method was called on a remote management computer or a Configuration Storage server on which the Microsoft Firewall service is not installed.

Example Code

The following Visual Basic code example retrieves the name of the current Forefront TMG computer by means of the GetContainingServer method.
Dim root As New FPCLib.FPC
Dim serverName As String
serverName = root.GetContainingServer.Name


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

Declared in Msfpccom.idl.


Requires Msfpccom.dll.

See Also


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.