JCL Help:EnableThreadPrivilege
JCL Help: EnableThreadPrivilege Function
Search in JCL Help
Search in all projects
Summary
Enables or disables a privilege for the thread.
Pascal
function EnableThreadPrivilege(const Enable: Boolean; const Privilege: string): Boolean;
Parameters
Parameters | Description |
const Enable: Boolean | If True the function attempts to enable the specified privilege. If False the function attempts to disable the specified privilege. |
const Privilege: string | Access Control | Access Control | Access Control Reference | Windows NT Privileges. For example, you can pass in SE_DEBUG_NAME to enable or disable the debugging privilege. |
Return Value
If the function succeeds the result is True, otherwise the result is False. Failure is usually caused by the caller not having sufficient access rights (i.e. TOKEN_ADJUST_PRIVILEGE) to enable or disable privileges.
Description
EnableThreadPrivilege enables or disables the specified privilege for the calling thread. You can, for example, enable the debug privilege by using this function. The user associated with the calling process must already have TOKEN_ADJUST_PRIVILEGES access. If the thread is currently impersonating a client then the client must have the appropriate access.
See Also
EnableProcessPrivilege IsPrivilegeEnabled
About
Unit
Donator
Marcel van Brakel
Notes
Under Windows 95/98/Millenium Edition, this function does nothing; in addition, it always returns True.
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page