IFPC::GetContainingServer method

Applies to: desktop apps only

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.

Syntax

HRESULT GetContainingServer(
  [out]  IFPCServer **ppItem
);
FPC.GetContainingServer( _
  ByRef ppItem As IFPCServer _
) As FPCServer

Parameters

  • ppItem [out]
    Address of an interface pointer that on return points to the IFPCServer interface that represents the current Forefront TMG computer.

Return value

C++

This method can return one of the following:

  • S_OK, indicating that the operation succeeded.
  • ERROR_FILE_NOT_FOUND, indicating that the IFPCServer interface 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. In this case, the [out] parameter returned is a null object.
  • An error code indicating that the operation failed. In this case, the [out] parameter returned is a null object.

VB

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.

Examples

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

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

FPC

 

 

Build date: 7/12/2010