Share via


FwpmProviderContextAdd0 (Compact 2013)

3/26/2014

This function adds a new provider context to the system.

Syntax

DWORD WINAPI FwpmProviderContextAdd0(
  __in       HANDLE engineHandle,
  __in       const FWPM_PROVIDER_CONTEXT0* providerContext,
  __in_opt   PSECURITY_DESCRIPTOR sd,
  __out_opt  UINT64* id
);

Parameters

  • engineHandle
    A handle for an open session to the filter engine. Call FwpmEngineOpen0 to open a session to the filter engine.
  • providerContext
    Address of an FWPM_PROVIDER_CONTEXT0 structure that describes the provider context object to be added.
  • sd
    Pointer to a SECURITY_DESCRIPTOR structure
  • id
    Pointer to a variable that receives a runtime identifier for this provider context

Return Value

Return code / value

Description

ERROR_SUCCESS

0

The provider context was successfully added

FWP_E_* error code

0x80320001-0x80320039

A Windows Filtering Platform (WFP) specific error. See topic WFP Error Codes for details.

RPC_* error code

0x80010001-0x80010122

Failure to communicate with the remote or local firewall engine

Remarks

Some fields in the FWPM_PROVIDER_CONTEXT0 structure are assigned by the system, not the caller, and are ignored in the call to FwpmProviderContextAdd0.

If the caller supplies a NULL security descriptor, the system will assign a default security descriptor.

This function cannot be called from within a read-only transaction. It will fail with FWP_E_INCOMPATIBLE_TXN.

The caller needs FWPM_ACTRL_ADD access to the provider context's container and FWPM_ACTRL_ADD_LINK access to the provider (if any). See WFP Access Right Identifiers for more information.

Requirements

Header

fwpmu.h

Library

fwpuclnt.dll

See Also

Reference

WFP Provider Context Management
WFP Access Right Identifiers

Other Resources

Windows Filtering Platform