Class: Chef::ReservedNames::Win32::API::Security::TOKEN_PRIVILEGES

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/chef/win32/api/security.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.size_with_privileges(num_privileges) ⇒ Object


373
374
375
# File 'lib/chef/win32/api/security.rb', line 373

def self.size_with_privileges(num_privileges)
  offset_of(:Privileges) + LUID_AND_ATTRIBUTES.size * num_privileges
end

Instance Method Details

#privilege(index) ⇒ Object


381
382
383
# File 'lib/chef/win32/api/security.rb', line 381

def privilege(index)
  LUID_AND_ATTRIBUTES.new(pointer + offset_of(:Privileges) + (index * LUID_AND_ATTRIBUTES.size))
end

#size_with_privilegesObject


377
378
379
# File 'lib/chef/win32/api/security.rb', line 377

def size_with_privileges
  TOKEN_PRIVILEGES.size_with_privileges(self[:PrivilegeCount])
end