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



327
328
329
# File 'lib/chef/win32/api/security.rb', line 327

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

Instance Method Details

#privilege(index) ⇒ Object



335
336
337
# File 'lib/chef/win32/api/security.rb', line 335

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

#size_with_privilegesObject



331
332
333
# File 'lib/chef/win32/api/security.rb', line 331

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