FwpmCalloutSetSecurityInfoByKey0 函数 (fwpmk.h)

FwpmCalloutSetSecurityInfoByKey0 函数在标注对象的安全描述符中设置指定的安全信息。

语法

NTSTATUS FwpmCalloutSetSecurityInfoByKey0(
  [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

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

[in, optional] key

指向唯一标识标注的 GUID 的指针。 当应用程序为此对象调用 FwpmCalloutAdd0 时,在 标注 参数的 calloutKey 成员中指定了此 GUID。

[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 代码 发生错误。

言论

如果 参数 NULL,或者它是 NULL GUID,则此函数管理标注容器的安全信息。

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

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

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

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

要求

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

另请参阅