Class: Aggkit::ChildProcess::Windows::SecurityAttributes

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/aggkit/childprocess/windows/structs.rb

Overview

typedef struct _SECURITY_ATTRIBUTES

DWORD  nLength;
LPVOID lpSecurityDescriptor;
BOOL   bInheritHandle;

SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ SecurityAttributes

Returns a new instance of SecurityAttributes.



75
76
77
78
79
80
81
# File 'lib/aggkit/childprocess/windows/structs.rb', line 75

def initialize(opts = {})
  super()

  self[:nLength]              = self.class.size
  self[:lpSecurityDescriptor] = nil
  self[:bInheritHandle]       = opts[:inherit] ? 1 : 0
end