FwpmFilterGetSecurityInfoByKey0 函数 (fwpmu.h)

FwpmFilterGetSecurityInfoByKey0 函数检索筛选器对象的安全描述符的副本。

语法

DWORD FwpmFilterGetSecurityInfoByKey0(
  [in]            HANDLE               engineHandle,
  [in, optional]  const GUID           *key,
  [in]            SECURITY_INFORMATION securityInfo,
  [out, optional] PSID                 *sidOwner,
  [out, optional] PSID                 *sidGroup,
  [out, optional] PACL                 *dacl,
  [out, optional] PACL                 *sacl,
  [out]           PSECURITY_DESCRIPTOR *securityDescriptor
);

参数

[in] engineHandle

类型: HANDLE

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

[in, optional] key

类型: const GUID*

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

[in] securityInfo

类型: SECURITY_INFORMATION

要检索的安全信息的类型。

[out, optional] sidOwner

类型: PSID*

返回的安全描述符中 (SID) 所有者安全标识符。

[out, optional] sidGroup

类型: PSID*

主组安全标识符 (返回的安全描述符中) SID。

[out, optional] dacl

类型: PACL*

返回的安全描述符中 (DACL) 自由访问控制列表。

[out, optional] sacl

类型: PACL*

系统访问控制列表 (返回的安全描述符中的 SACL) 。

[out] securityDescriptor

类型: PSECURITY_DESCRIPTOR*

返回的安全描述符。

返回值

类型:DWORD

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

备注

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

必须通过调用 FwpmFreeMemory0 来释放返回的 securityDescriptor 参数。 不能释放其他四个 (可选) 返回的参数,因为它们指向 securityDescriptor 参数中的地址。

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

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

要求

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

另请参阅

FwpmFilterSetSecurityInfoByKey0