FwpsRedirectHandleCreate0 function (fwpsk.h)

The FwpsRedirectHandleCreate0 function creates a handle that connection redirection functions can use to redirect connections to a local process. For more information about redirection, see Using Bind or Connect Redirection.

Note  FwpsRedirectHandleCreate0 is a specific version of FwpsRedirectHandleCreate. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information.

 

Syntax

NTSTATUS FwpsRedirectHandleCreate0(
  const GUID *providerGuid,
  UINT32     flags,
  HANDLE     *redirectHandle
);

Parameters

providerGuid

The provider GUID.

flags

Reserved. Set to zero.

redirectHandle

A pointer to the variable that receives the handle.

Return value

The FwpsRedirectHandleCreate0 function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
A redirect handle was successfully returned. The variable that the redirectHandle parameter points to contains the handle.
Other status codes
An error occurred.

Remarks

A callout driver calls the FwpsRedirectHandleCreate0 function to create a handle that can be used to redirect connections.

For more information about redirection, see Using Bind or Connect Redirection.

Your callout driver should call FwpsRedirectHandleCreate0 once and cache the handle so that it can reuse the handle.

Before an Application Layer Enforcement (ALE) connect redirection callout can redirect connections to a local process, it must obtain a redirect handle with the FwpsRedirectHandleCreate0 function and put the handle in the FWPS_CONNECT_REQUEST0 structure. The callout modifies the structure in the classifyFn for the ALE connect redirect layers.

After a callout driver has finished using a redirect handle, it must call the FwpsRedirectHandleDestroy0 function to destroy the handle.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Universal
Header fwpsk.h (include Fwpsk.h)
Library Fwpkclnt.lib
IRQL PASSIVE_LEVEL

See also

FWPS_CONNECT_REQUEST0

FwpsRedirectHandleDestroy0

classifyFn