The AllocateAndInitializeSid function allocates and initializes a security identifier (SID) with up to eight subauthorities.
BOOL AllocateAndInitializeSid(
PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, |
// pointer to identifier authority |
BYTE nSubAuthorityCount, |
// count of subauthorities |
DWORD dwSubAuthority0, |
// subauthority 0 |
DWORD dwSubAuthority1, |
// subauthority 1 |
DWORD dwSubAuthority2, |
// subauthority 2 |
DWORD dwSubAuthority3, |
// subauthority 3 |
DWORD dwSubAuthority4, |
// subauthority 4 |
DWORD dwSubAuthority5, |
// subauthority 5 |
DWORD dwSubAuthority6, |
// subauthority 6 |
DWORD dwSubAuthority7, |
// subauthority 7 |
PSID *pSid |
// pointer to pointer to SID |
); |
For example, a value of 3 indicates that the subauthority values specified by
the dwSubAuthority0, dwSubAuthority1, and dwSubAuthority2
parameters have meaningful values and to ignore the remainder.
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.
An SID allocated with the AllocateAndInitializeSid function must be freed by using the FreeSid function.
FreeSid, GetSidIdentifierAuthority, InitializeSid, SID_IDENTIFIER_AUTHORITY
file: /Techref/os/win/api/win32/func/src/f02.htm, 5KB, , updated: 2000/4/7 11:19, local time: 2024/11/23 01:23,
3.15.17.60:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/os/win/api/win32/func/src/f02.htm"> AllocateAndInitializeSid</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.