WinStd Windows Win32 API using Standard C++

Loading...
Searching...
No Matches
Public Member Functions | List of all members
winstd::user_impersonator Class Reference
Windows API

Lets the calling thread impersonate the security context of a logged-on user. More...

`#include <WinStd/Win.h>`

Inheritance diagram for winstd::user_impersonator:

## Public Member Functions
| user_impersonator (HANDLE hToken) noexcept
| Construct the impersonator and impersonates the given user.
Public Member Functions inherited from winstd::impersonator
| impersonator () noexcept
| Construct the impersonator.
virtual | ~impersonator ()
| Reverts to current user and destructs the impersonator.
| operator bool () const
| Did impersonation succeed?

## Additional Inherited Members
Protected Attributes inherited from winstd::impersonator
BOOL | m_cookie
| Did impersonation succeed?

## Detailed Description

Lets the calling thread impersonate the security context of a logged-on user.

## Constructor & Destructor Documentation

## ◆ user_impersonator()

winstd::user_impersonator::user_impersonator | ( | HANDLE | hToken | ) |
| inline noexcept

Construct the impersonator and impersonates the given user.

Parameters

  [in] | hToken | A handle to a primary or impersonation access token that represents a logged-on user or NULL for no impersonation.

See also
  ImpersonateLoggedOnUser function

The documentation for this class was generated from the following file:

- include/WinStd/Win.h