FwpmEngineSetSecurityInfo0 函数 (fwpmk.h)

FwpmEngineSetSecurityInfo0 函数在筛选器引擎的安全描述符中设置指定的安全信息。

语法

NTSTATUS FwpmEngineSetSecurityInfo0(
  [in]           HANDLE               engineHandle,
  [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

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

[in] securityInfo

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

[in, optional] sidOwner

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

[in, optional] sidGroup

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

[in, optional] dacl

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

[in, optional] sacl

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

返回值

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

言论

无法从事务中调用 FwpmEngineSetSecurityInfo0,它失败并 FWP_E_TXN_IN_PROGRESS。 有关事务的详细信息,请参阅 对象管理

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

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

要求

要求 价值
最低支持的客户端 从 Windows Vista 开始可用。
目标平台 普遍
标头 fwpmk.h
fwpkclnt.lib
IRQL <= PASSIVE_LEVEL

另请参阅