次の方法で共有


IFWXFirewall::StartHeavyBlockingOperation method

Applies to: desktop apps only

The StartHeavyBlockingOperation method notifies the Microsoft Firewall service that a thread is busy with a lengthy blocking operation.

Syntax

HRESULT StartHeavyBlockingOperation();

Parameters

This method has no parameters.

Return value

This method can return one of these values.

  • S_OK
    The method succeeded.

  • FWX_E_ALREADY_IN_BLOCKING_OP
    The blocking operation is already started.

Remarks

The IFWXFirewall::StartHeavyBlockingOperation and IFWXFirewall::EndHeavyBlockingOperation methods manage the creation of additional completion port worker threads when all existing threads are blocked. The completion port model works best when all I/O operations are overlapped. When some calls are blocking, all worker threads may be blocked, and the service will be idle. When this method is used, the Firewall service keeps track of the number of threads that are busy with blocking operations and creates new threads when necessary.

Call the IFWXFirewall::StartHeavyBlockingOperation method before making a blocking operation such as a call to the gethostbyname function or reading (non-overlapped) from a file or a pipe. Call the IFWXFirewall::EndHeavyBlockingOperation method after the blocking call returns.

Do not call the IFWXFirewall::StartHeavyBlockingOperation method before waiting for a critical section or a resource on which other threads are likely to be blocked. If the newly created thread is blocked on the same critical section, there will be greater congestion on the critical section and more context switches, resulting in an overall reduction in performance.

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

IFWXFirewall

IFWXFirewall::EndHeavyBlockingOperation

 

 

Build date: 7/12/2010