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



283
284
285
# File 'lib/chef/win32/api/security.rb', line 283

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

Instance Method Details

#privilege(index) ⇒ Object



291
292
293
# File 'lib/chef/win32/api/security.rb', line 291

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

#size_with_privilegesObject



287
288
289
# File 'lib/chef/win32/api/security.rb', line 287

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