Sha256: 839c7394f58529d5a0445d9f17402f2d830409750e2bdc9d0f649eadf4c7d330

Contents?: true

Size: 1.36 KB

Versions: 13

Compression:

Stored size: 1.36 KB

Contents

require 'windows/api'
include Windows

module Windows
   module SystemInfo
      API.auto_namespace = 'Windows::SystemInfo'
      API.auto_constant  = true
      API.auto_method    = true
      API.auto_unicode   = true

      # Obsolete processor info constants
      PROCESSOR_INTEL_386     = 386
      PROCESSOR_INTEL_486     = 486
      PROCESSOR_INTEL_PENTIUM = 586
      PROCESSOR_INTEL_IA64    = 2200
      PROCESSOR_AMD_X8664     = 8664

      # Enum COMPUTER_NAME_FORMAT
      ComputerNameNetBIOS                    = 0
      ComputerNameDnsHostname                = 1
      ComputerNameDnsDomain                  = 2
      ComputerNameDnsFullyQualified          = 3
      ComputerNamePhysicalNetBIOS            = 4
      ComputerNamePhysicalDnsHostname        = 5
      ComputerNamePhysicalDnsDomain          = 6 
      ComputerNamePhysicalDnsFullyQualified  = 7
      ComputerNameMax                        = 8
      
      API.new('ExpandEnvironmentStrings', 'PPL', 'L')
      API.new('GetComputerName', 'PP', 'B')
      API.new('GetComputerNameEx', 'PPP', 'B')
      API.new('GetSystemInfo', 'P', 'V')
      API.new('GetUserName', 'PP', 'B', 'advapi32')
      API.new('GetUserNameEx', 'LPP', 'B', 'secur32')
      API.new('GetVersion', 'V', 'L')
      API.new('GetVersionEx', 'P', 'B')
      API.new('GetWindowsDirectory', 'PI', 'I')
   end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
windows-pr-0.7.4 lib/windows/system_info.rb
windows-pr-0.8.3 lib/windows/system_info.rb
windows-pr-0.8.1 lib/windows/system_info.rb
windows-pr-0.8.4 lib/windows/system_info.rb
windows-pr-0.7.2 lib/windows/system_info.rb
windows-pr-0.8.7 lib/windows/system_info.rb
windows-pr-0.7.0 lib/windows/system_info.rb
windows-pr-0.7.1 lib/windows/system_info.rb
windows-pr-0.7.3 lib/windows/system_info.rb
windows-pr-0.8.0 lib/windows/system_info.rb
windows-pr-0.8.2 lib/windows/system_info.rb
windows-pr-0.8.5 lib/windows/system_info.rb
windows-pr-0.8.6 lib/windows/system_info.rb