IFWXFirewall::GetClientSession method
Applies to: desktop apps only
The GetClientSession method retrieves or, if necessary, creates a session object for a specified client address.
Syntax
HRESULT GetClientSession(
[in] LPSOCKADDR Address,
[in] DWORD AddressLength,
[out] IFWXSession **ppiClientSession
);
Parameters
Address [in]
Pointer to a sockaddr structure that contains the address of the client for which the session object is needed. The port is ignored.AddressLength [in]
Length, in bytes, of the structure pointed to by the Address parameter.ppiClientSession [out]
Address of an interface pointer that on return points to the IFWXSession interface on the session object for the client address specified.
Return value
This method returns S_OK if the call is successful; otherwise, it returns an error code.
Remarks
Inbound primary connections can be directed to a SecureNAT client by using the IFWXFirewall::CreatePrivateSession or IFWXFirewall::GetClientSession method. Use the IFWXFirewall::CreatePrivateSession method when the inbound connection was requested by an application, the SecureNAT client is not known by the Microsoft Firewall service, and no session object has been created. Use the IFWXFirewall::GetClientSession method only if the filter can assert that the client is configured to be a SecureNAT client of that server.
Requirements
Minimum supported client |
None supported |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only) |
Version |
Forefront Threat Management Gateway (TMG) 2010 |
Header |
Wspfwext.idl |
DLL |
Wspsrv.exe |
See also
Build date: 7/12/2010