• All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class SECURITY_ATTRIBUTES
    extends Struct
    implements NativeResource
    Contains the security descriptor for an object and specifies whether the handle retrieved by specifying this structure is inheritable. This structure provides security settings for objects created by various functions, such as CreateFile, CreatePipe, CreateProcess, RegCreateKeyEx, or RegSaveKeyEx.

    Member documentation

    • nLength – the size, in bytes, of this structure. Set this value to SIZEOF.
    • lpSecurityDescriptor – a pointer to a SECURITY_DESCRIPTOR structure that controls access to the object. If the value of this member is NULL, the object is assigned the default security descriptor associated with the access token of the calling process. This is not the same as granting access to everyone by assigning a NULL discretionary access control list (DACL). By default, the default DACL in the access token of a process allows access only to the user represented by the access token.
    • bInheritHandle – specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle.


         DWORD nLength;
         LPVOID lpSecurityDescriptor;
         BOOL bInheritHandle;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail


        public SECURITY_ATTRIBUTES​(java.nio.ByteBuffer container)
        Creates a SECURITY_ATTRIBUTES instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.