JCL Help:EnableProcessPrivilege

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Enables or disables a privilege for the process.


Pascal

 function EnableProcessPrivilege(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

EnableProcessPrivilege enables or disables the specified privilege for the current process. 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.


See Also

EnableThreadPrivilege IsPrivilegeEnabled


About

Unit

JclSecurity


Donator

Marcel van Brakel


Notes

Under Windows 95/98/Millenium Edition, this function 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