Function Reference


Opens the access token associated with a process

#include <WinAPIProc.au3>
_WinAPI_OpenProcessToken ( $iAccess [, $hProcess = 0] )


$iAccess Access mask that specifies the requested types of access to the access token. This parameter can be
one or more of the following values.
$hProcess [optional] Handle to the process whose access token is opened. The process must have the
$PROCESS_QUERY_INFORMATION access permission. If this parameter is 0 (Default), will use the current process.

Return Value

Success: Handle that identifies the newly opened access token.
Failure: 0, call _WinAPI_GetLastError() to get extended error information.


Close the access token handle returned through this function by calling _WinAPI_CloseHandle().



See Also

Search OpenProcessToken in MSDN Library.