CreateNetworkSocket Method of the IFWXSession Interface

The CreateNetworkSocket method creates a TCP/IP socket that is associated with the session.

Syntax

HRESULT CreateNetworkSocket(
  [in]   INT Protocol,
  [out]  IFWXNetworkSocket** piSocket
);

Parameters

Protocol

Protocol flags. This parameter can have the following flag values:

Value Meaning

FWX_PROTOCOL_TCP

The method will create a TCP socket.

FWX_PROTOCOL_UDP

The method will create a UDP socket.

piSocket

Address of a variable that receives a pointer to the new IFWXNetworkSocket interface created.

Return Value

S_OK

The socket was created.

E_OUTOFMEMORY

Not enough memory or resources could be allocated to process the event. The socket was not created.

HRESULT_FROM_WIN32(Win32 error code)

Winsock or Windows error code. The method failed, and the socket was not created.

Remarks

The socket created by this method is user-specific, and obeys the policy rules for the session. Connections are logged as if they were performed by the session's user.

To create a socket that is not user-specific, use IFWXFirewall::CreateNetworkSocket.

Requirements

Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
Header

Declared in Wspfwext.idl.

DLL

Requires Wspsrv.exe.

See Also

IFWXSession
IFWXFirewall::CreateNetworkSocket


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.

[an error occurred while processing this directive]