AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

AllocateAndInitializeSid

The AllocateAndInitializeSid function allocates and initializes a security identifier (SID) with up to eight subauthorities.

VB4-32,5,6
Declare Function AllocateAndInitializeSid Lib "Advapi32" (pIdentifierAuthority As SID_IDENTIFIER_AUTHORITY, ByVal nSubAuthorityCount As Byte, ByVal nSubAuthority0 As Long, ByVal nSubAuthority1 As Long, ByVal nSubAuthority2 As Long, ByVal nSubAuthority3 As Long, ByVal nSubAuthority4 As Long, ByVal nSubAuthority5 As Long, ByVal nSubAuthority6 As Long, ByVal nSubAuthority7 As Long, lpPSid As Long) As Long

Operating Systems Supported
Requires Windows NT 3.1 or later; Win9x/ME: Not supported

Library
Advapi32

Parameter Information
· pIdentifierAuthority
[in] Pointer to a SID_IDENTIFIER_AUTHORITY structure, giving the top-level identifier authority value to set in the SID.

· nSubAuthorityCount
[in] Specifies the number of subauthorities to place in the SID. This parameter also identifies how many of the subauthority parameters have meaningful values. This parameter must contain a value from 1 to 8.
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.

· dwSubAuthority0
[in] Subauthority value to place in the SID.

· dwSubAuthority1
[in] Subauthority value to place in the SID.

· dwSubAuthority2
[in] Subauthority value to place in the SID.

· dwSubAuthority3
[in] Subauthority value to place in the SID.

· dwSubAuthority4
[in] Subauthority value to place in the SID.

· dwSubAuthority5
[in] Subauthority value to place in the SID.

· dwSubAuthority6
[in] Subauthority value to place in the SID.

· dwSubAuthority7
[in] Subauthority value to place in the SID.

· pSid
[out] Pointer to a variable that receives the pointer to the allocated and initialized SID structure.

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.

Examples

Related Functions

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/