Returns a security identifier of the group, specified by an index in the specified token.
- Parameters
-
[in] | hToken | is a handle to a token containing the returned group. |
[in] | iGroupIndex | is an index of the group within a vector, pointed to by the Groups field of the TOKEN_GROUPS object, returned by the GetTokenInformation function. |
- Returns
- Returns a smart pointer to a buffer, containing a security identifier (aka SID) of the requested group.
The token must be opened with TOKEN_QUERY access right. Tokens returned by the GetCurrentImpersonationToken have one.
- Exceptions
-