Package com.sun.jna.platform.win32
Klasse Advapi32Util.Privilege
java.lang.Object
com.sun.jna.platform.win32.Advapi32Util.Privilege
- Alle implementierten Schnittstellen:
Closeable
,AutoCloseable
- Umschließende Klasse:
Advapi32Util
Convenience class to enable certain Windows process privileges
-
Konstruktordetails
-
Privilege
Construct and enable a set of privileges- Parameter:
privileges
- the names of the privileges in the form of SE_* from Advapi32.java- Löst aus:
IllegalArgumentException
Win32Exception
-
-
Methodendetails
-
close
public void close()Calls disable() to remove the privileges- Angegeben von:
close
in SchnittstelleAutoCloseable
- Angegeben von:
close
in SchnittstelleCloseable
- Siehe auch:
-
enable
Enables the given privileges. If required, it will duplicate the process token. No resources are left open when this completes. That is, it is NOT required to drop the privileges, although it is considered a best practice if you do not need it. This class is state full. It keeps track of whether it has enabled the privileges. Multiple calls to enable() without a drop() in between have no affect.- Gibt zurück:
- pointer to self (Privilege) as a convenience for try with resources statements
- Löst aus:
Win32Exception
-
disable
Disabled the prior enabled privilege- Löst aus:
Win32Exception
-