SetCurrentProcessPrivileges(String, ProcessPrivileges, PrivilegeStates)
|
Enable or disable a process privilege for the current process.
Note that this method cannot add or remove privileges for external processes.
It can only enable existing privileges that are currently disabled, or disable existing privileges that are currently enabled.
Trying to enable or disable a removed privilege will result in a exception.
In order to avoid this exception, it is recommended to call GetProcessPrivilegeState(Process, ProcessPrivileges)
to determine whether a privilege is removed before calling this method.
|