java.io.Closeable, java.lang.AutoCloseablepublic static class Advapi32Util.Privilege
extends java.lang.Object
implements java.io.Closeable
| Constructor | Description |
|---|---|
Privilege(java.lang.String... privileges) |
Construct and enable a set of privileges
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Calls disable() to remove the privileges
|
void |
disable() |
Disabled the prior enabled privilege
|
Advapi32Util.Privilege |
enable() |
Enables the given privileges.
|
public Privilege(java.lang.String... privileges)
throws java.lang.IllegalArgumentException,
Win32Exception
privileges - the names of the privileges in the form of SE_* from Advapi32.javajava.lang.IllegalArgumentExceptionWin32Exceptionpublic void close()
close in interface java.lang.AutoCloseableclose in interface java.io.CloseableCloseable.close()public Advapi32Util.Privilege enable() throws Win32Exception
Win32Exceptionpublic void disable()
throws Win32Exception
Win32Exception