win32security.AdjustTokenPrivileges
Carlo Bertuccini
c.bertu at libero.it
Tue Dec 5 14:33:29 EST 2000
More information about the Python-list mailing list
Tue Dec 5 14:33:29 EST 2000
- Previous message (by thread): win32security.AdjustTokenPrivileges
- Next message (by thread): win32security.AdjustTokenPrivileges
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Patrick,
> hProcess = GetCurrentProcess()
> processToken = OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES |
> TOKEN_QUERY)
There is something strange in your code ... this is the declaration of
OpenProcessToken:
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.
Regards,
--
- Carlo -
c.bertu at libero.it
- Previous message (by thread): win32security.AdjustTokenPrivileges
- Next message (by thread): win32security.AdjustTokenPrivileges
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list