Partager via


FwpmSubLayerAdd0 (Compact 7)

3/12/2014

This function adds a new sub-layer to the system.

Syntax

DWORD WINAPI FwpmSubLayerAdd0(
  __in      HANDLE engineHandle,
  __in      const FWPM_SUBLAYER0* subLayer,
  __in_opt  PSECURITY_DESCRIPTOR sd
);

Parameters

  • engineHandle
    A handle for an open session to the filter engine. Call FwpmEngineOpen0 to open a session to the filter engine.
  • subLayer
    Address of an FWPM_SUBLAYER0 structure that describes the sub-layer to be added.
  • sd
    Pointer to a SECURITY_DESCRIPTOR structure.

Return Value

Return code / value Description

ERROR_SUCCESS

0

The sub-layer 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

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 sub-layers'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 Sub-Layer Management
WFP Access Right Identifiers
WFP Management Functions

Other Resources

Windows Filtering Platform