Share via


EmulateForConnect Method of the IFWXConnection Interface

The EmulateForConnect method emulates a connection for an outbound request. In the outbound scenario, a data filter emulates the external connection for an internal client.

Syntax

HRESULT EmulateForConnect(
  [in]  IFWXDataFilter* piDataFilter,
  [in]  IUnknown* punkFilterContext
);

Parameters

  • piDataFilter
    Pointer to the IFWXDataFilter interface of the Microsoft Firewall service data filter object to use with this connection.

  • punkFilterContext
    Pointer to the interface to use to pass context information to the data filter, such as the session to which the data filter is being attached. This interface is passed to the IFWXDataFilter::SetSockets method in the punkFilterContext parameter. This parameter can be NULL.

Return Value

  • S_OK
    The method succeeded.

  • E_OUTOFMEMORY
    Not enough memory or resources could be allocated to complete the operation.

  • FWX_E_TERMINATING
    The object is shutting down.

  • E_INVALIDARG
    Invalid value was passed to the method.

  • FWX_E_ALREADY_EMULATED
    The connection is already being emulated (the same connection cannot be emulated twice).

  • FWX_E_BAD_CONTEXT
    This method is only valid in the context of certain events. It cannot be used at other times.

Requirements

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

Declared in Wspfwext.idl.

DLL

Requires Wspsrv.exe.

See Also

IFWXConnection

Send comments about this topic to Microsoft

Build date: 6/30/2010