Export (0) Print
Expand All
Expand Minimize

GetSidSubAuthority function

The GetSidSubAuthority function returns a pointer to a specified subauthority in a security identifier (SID). The subauthority value is a relative identifier (RID).

Syntax


PDWORD WINAPI GetSidSubAuthority(
  _In_  PSID pSid,
  _In_  DWORD nSubAuthority
);

Parameters

pSid [in]

A pointer to the SID structure from which a pointer to a subauthority is to be returned.

This function does not handle SID structures that are not valid. Call the IsValidSid function to verify that the SID structure is valid before you call this function.

nSubAuthority [in]

Specifies an index value identifying the subauthority array element whose address the function will return. The function performs no validation tests on this value. An application can call the GetSidSubAuthorityCount function to discover the range of acceptable values.

Return value

If the function succeeds, the return value is a pointer to the specified SID subauthority. To get extended error information, call GetLastError.

If the function fails, the return value is undefined. The function fails if the specified SID structure is not valid or if the index value specified by the nSubAuthority parameter is out of bounds.

Remarks

The SID structure specified in pSid uses a 32-bit RID value. For applications that require longer RID values, use CreateWellKnownSid and related functions.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

Access Control Overview
Basic Access Control Functions
CreateWellKnownSid
GetLengthSid
GetSidIdentifierAuthority
GetSidLengthRequired
GetSidSubAuthorityCount
IsValidSid
SID

 

 

Community Additions

ADD
Show:
© 2014 Microsoft