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.
C++
Syntax
HRESULT GetContainingServer(
[out] IFPCServer** ppItem
);
Parameters
- 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:
- 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.
Visual Basic
Syntax
Function GetContainingServer() As FPCServer
Parameters
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
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
Send comments about this topic to Microsoft
Build date: 6/30/2010