다음을 통해 공유


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( );

Parameters

  • 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.

Return Value

Returns true on success, false on failure.

Remarks

Calls the OpenProcessToken Win32 function.

Requirements

Header: atlsecurity.h

See Also

Reference

CAccessToken Class

Other Resources

CAccessToken Members