WinStd
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
|
Lets the calling thread impersonate the security context of a logged-on user. More...
#include <WinStd/Win.h>
Public Member Functions | |
user_impersonator (1 HANDLE hToken) noexcept | |
Construct the impersonator and impersonates the given user. More... | |
virtual | ~user_impersonator () |
Reverts to current user and destructs the impersonator. More... | |
Protected Attributes | |
BOOL | m_cookie |
Did impersonation succeed? | |
Lets the calling thread impersonate the security context of a logged-on user.
|
inlinenoexcept |
Construct the impersonator and impersonates the given user.
[in] | hToken | A handle to a primary or impersonation access token that represents a logged-on user or NULL for no impersonation. |
|
inlinevirtual |
Reverts to current user and destructs the impersonator.