Skip navigation links
JNA API 4.4.0
com.sun.jna.platform.win32

Class Advapi32Util.Privilege

    • Method Detail

      • enable

        public Advapi32Util.Privilege enable()
                                      throws Win32Exception
        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.
        Returns:
        pointer to self (Privilege) as a convenience for try with resources statements
        Throws:
        Win32Exception
JNA API 4.4.0

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.