Class: ChildProcess::Windows::SecurityAttributes

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/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



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

def initialize(opts = {})
  super()

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