FwpmFilterSetSecurityInfoByKey0 函数 (fwpmu.h)

FwpmFilterSetSecurityInfoByKey0 函数在筛选器对象的安全描述符中设置指定的安全信息。

语法

DWORD FwpmFilterSetSecurityInfoByKey0(
  [in]           HANDLE               engineHandle,
  [in, optional] const GUID           *key,
  [in]           SECURITY_INFORMATION securityInfo,
  [in, optional] const SID            *sidOwner,
  [in, optional] const SID            *sidGroup,
  [in, optional] const ACL            *dacl,
  [in, optional] const ACL            *sacl
);

参数

[in] engineHandle

类型: HANDLE

筛选器引擎的打开会话的句柄。 调用 FwpmEngineOpen0 以打开与筛选器引擎的会话。

[in, optional] key

类型: const GUID*

筛选器的唯一标识符。 当应用程序为此对象调用 FwpmFilterAdd0 时,在 filter 参数的 filterKey 成员中指定了此 GUID。

[in] securityInfo

类型: SECURITY_INFORMATION

要设置的安全信息的类型。

[in, optional] sidOwner

类型: const SID*

所有者的安全标识符 (SID) 在安全描述符中设置。

[in, optional] sidGroup

类型: const SID*

在安全描述符中设置的组的 SID。

[in, optional] dacl

类型: const ACL*

在安全描述符中设置的 DACL) (自由访问控制列表。

[in, optional] sacl

类型: const ACL*

系统访问控制列表 (在安全描述符中设置 SACL) 。

返回值

类型:DWORD

返回代码/值 说明
ERROR_SUCCESS
0
已成功设置安全描述符。
FWP_E_* 错误代码
0x80320001— 0x80320039
Windows 筛选平台 (WFP) 特定错误。 有关详细信息 ,请参阅 WFP 错误代码
RPC_* 错误代码
0x80010001 — 0x80010122
无法与远程或本地防火墙引擎通信。

注解

如果 参数为 NULLNULL GUID,则此函数管理筛选器容器的安全信息。

不能从事务中调用此函数。 它将失败并 FWP_E_TXN_IN_PROGRESS。 有关事务的详细信息,请参阅 对象管理

如果在同一会话期间添加了相应的对象,则可以在动态会话中调用此函数。 如果为在不同动态会话期间添加的对象调用此函数,它将失败并 FWP_E_WRONG_SESSION。 如果为动态会话期间未添加的对象调用此函数,它将失败并 FWP_E_DYNAMIC_SESSION_IN_PROGRESS

此函数的行为类似于标准 Win32 SetSecurityInfo 函数。 调用方需要 与 SetSecurityInfo 参考主题中所述相同的标准访问权限。

FwpmFilterSetSecurityInfoByKey0 是 FwpmFilterSetSecurityInfoByKey 的特定实现。 有关详细信息 ,请参阅 WFP Version-Independent 名称和面向特定版本的 Windows

要求

要求
最低受支持的客户端 Windows Vista [仅限桌面应用]
最低受支持的服务器 Windows Server 2008 [仅限桌面应用]
目标平台 Windows
标头 fwpmu.h
Library Fwpuclnt.lib
DLL Fwpuclnt.dll

另请参阅

FwpmFilterGetSecurityInfoByKey0