chsvlib
chsv helper source code

◆ GetCurrentImpersonationToken()

AutoToken Chusov::Win32::Security::GetCurrentImpersonationToken ( )

Returns a handle to an impersonation token of the calling thread. If the thread does not have one, the returned token is an impersonation token, retrieved from a primary token of the current process.

Returns
A handle of the token.
Exceptions
Chusov::Exceptions::ChsvCodeExceptionSystem-level error occurred.
Examples
chsvwinutilex\CreateDACL.cpp.