FwpmProviderContextGetByKey3 function (fwpmu.h)

Retrieves a provider context.

Syntax

DWORD FwpmProviderContextGetByKey3(
  HANDLE                 engineHandle,
  const GUID             *key,
  FWPM_PROVIDER_CONTEXT3 **providerContext
);

Parameters

engineHandle

Type: _In_ HANDLE

A handle to an open session with the filter engine. To open a session with the filter engine, call FwpmEngineOpen0.

key

Type: _In_ const GUID*

Pointer to a GUID that uniquely identifies the provider context. This is a pointer to the same GUID that was specified when your application called FwpmProviderContextAdd3 for this object.

providerContext

Type: _Outptr_ FWPM_PROVIDER_CONTEXT3**

The provider context information.

Return value

Type: DWORD*

Return code/value Description
ERROR_SUCCESS
0
The provider context was retrieved successfully.
FWP_E_* error code
0x80320001—0x80320039
A Windows Filtering Platform (WFP)-specific error. For details, see WFP error codes.
RPC_* error code
0x80010001—0x80010122
Failure to communicate with the remote or local firewall engine.

Remarks

You must free the returned object by calling FwpmFreeMemory0.

To call this function, you need FWPM_ACTRL_READ access to the provider context. For more info, see Access control.

Requirements

Requirement Value
Header fwpmu.h
Library Fwpuclnt.lib
DLL Fwpuclnt.dll