pblanchette at pixelsystems.com
Tue Dec 5 16:57:03 EST 2000
In fact, the declaration of OpenProcessToken in the Python extensions
for Windows is :
int = OpenProcessToken( processHandle, desiredAccess ).
I suppose the integer returns is the token handle.
Carlo Bertuccini wrote:
> Hi Patrick,
>> hProcess = GetCurrentProcess()
>> processToken = OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES |
> There is something strange in your code ... this is the declaration of
> BOOL OpenProcessToken(
> HANDLE ProcessHandle, // handle to process
> DWORD DesiredAccess, // desired access to process
> PHANDLE TokenHandle // pointer to handle of open access token
> The "ProcessToken" is not the Token Handle, but a boolean value: the result
> of the function.
> The AdjustTokenPrivileges needs the real Token Handle in order to set the
> new privileges.
> - Carlo -
> c.bertu at libero.it
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list