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



386
387
388
# File 'lib/chef/win32/api/security.rb', line 386

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

Instance Method Details

#privilege(index) ⇒ Object



394
395
396
# File 'lib/chef/win32/api/security.rb', line 394

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

#size_with_privilegesObject



390
391
392
# File 'lib/chef/win32/api/security.rb', line 390

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