chsvlib
chsv helper source code

◆ GetTokenGroupsNames()

std::vector<std::basic_string<wchar_t, traits_t, string_alloc_t>, vector_alloc_t> Chusov::Win32::Security::GetTokenGroupsNames ( HANDLE  hToken)

Returns a vector of names of groups, the specified token belongs to.

Template Parameters
traits_tis a type implementing character traits class of the returned wide string. The default value of the template parameter is std::char_traits<wchar_t>.
string_alloc_tis a type of an allocator used by the returned string object. The default template argument is the default allocator instantiated for the wide character type - std::allocator<wchar_t>.
vector_alloc_tis a type of an allocator used by the returned vector of strings. By default the template type parameter is the string_alloc_t rebound to the type of the string.
Parameters
[in]hTokenis a handle of the token describing a principal, which groups are returned by the function.
Returns
Returns an std::vector object of wide strings represented as std::basic_string objects describing groups of the principal described by the token.
Exceptions
Chusov::Exceptions::ChsvCodeExceptionSystem-level error occurred.