请帮我解释一下InitializeSid函数中参数的意义!

firmbird 2003-01-14 12:45:17
如题
...全文
42 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
firmbird 2003-01-14
  • 打赏
  • 举报
回复
晕,这你也给我贴上来了,谢了先!
能给个更清楚一点的解释吗?最好给个示例代码
LeeZi 2003-01-14
  • 打赏
  • 举报
回复
InitializeSid

The InitializeSid function initializes a security identifier (SID).

BOOL InitializeSid(
PSID Sid,
PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount
);

Parameters
Sid
[out] Pointer to a SID structure to be initialized.
pIdentifierAuthority
[in] Pointer to a SID_IDENTIFIER_AUTHORITY structure to set in the SID structure.
nSubAuthorityCount
[in] Specifies the number of subauthorities to set in the SID. Values of the subauthority must be set separately, as described in the following Remarks section.

Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks
Although the InitializeSid function sets the number of subauthorities for the SID, it does not set the subauthority values. This must be done separately, using functions such as GetSidSubAuthority.

An application can use the AllocateAndInitializeSid function to initialize a SID and set its subauthority values.

This function uses a 32-bit RID value. For applications that require a larger RID value, use CreateWellKnownSid.

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧