Поделиться через


CAccessToken::GetProcessToken

Call this method to initialize the CAccessToken with the access token from the given process.

bool GetProcessToken(
   DWORD dwDesiredAccess,
   HANDLE hProcess = NULL 
) throw( );

Параметры

  • dwDesiredAccess
    Specifies an access mask that specifies the requested types of access to the access token. These requested access types are compared with the token's DACL to determine which accesses are granted or denied.

  • hProcess
    Handle to the process whose access token is opened. If the default value of NULL is used, the current process is used.

Возвращаемое значение

Returns true on success, false on failure.

Заметки

Calls the OpenProcessToken Win32 function.

Требования

Header: atlsecurity.h

См. также

Основные понятия

CAccessToken Class

CAccessToken Members