Module: Windows::SystemInfo

Defined in:
lib/windows/system_info.rb

Constant Summary collapse

PROCESSOR_INTEL_386 =

Obsolete processor info constants

386
PROCESSOR_INTEL_486 =
486
PROCESSOR_INTEL_PENTIUM =
586
PROCESSOR_INTEL_IA64 =
2200
PROCESSOR_AMD_X8664 =
8664
ComputerNameNetBIOS =

Enum COMPUTER_NAME_FORMAT

0
ComputerNameDnsHostname =
1
ComputerNameDnsDomain =
2
ComputerNameDnsFullyQualified =
3
ComputerNamePhysicalNetBIOS =
4
ComputerNamePhysicalDnsHostname =
5
ComputerNamePhysicalDnsDomain =
6
ComputerNamePhysicalDnsFullyQualified =
7
ComputerNameMax =
8
ExpandEnvironmentStrings =
Win32API.new('kernel32', 'ExpandEnvironmentStrings', 'PPL', 'L')
GetComputerName =
Win32API.new('kernel32', 'GetComputerName', 'PP', 'I')
GetComputerNameEx =
Win32API.new('kernel32', 'GetComputerNameEx', 'PPP', 'I')
GetSystemInfo =
Win32API.new('kernel32', 'GetSystemInfo', 'P', 'V')
GetUserName =
Win32API.new('advapi32', 'GetUserName', 'PP', 'I')
GetUserNameEx =
Win32API.new('secur32', 'GetUserNameEx', 'LPP', 'I')
GetVersion =
Win32API.new('kernel32', 'GetVersion', 'V', 'L')
GetVersionEx =
Win32API.new('kernel32', 'GetVersionEx', 'P', 'I')
GetWindowsDirectory =
Win32API.new('kernel32', 'GetWindowsDirectory', 'LI', 'I')

Instance Method Summary collapse

Instance Method Details

#ExpandEnvironmentStrings(src, dest, size) ⇒ Object



34
35
36
# File 'lib/windows/system_info.rb', line 34

def ExpandEnvironmentStrings(src, dest, size)
   ExpandEnvironmentStrings.call(src, dest, size)
end

#GetComputerName(buffer, size) ⇒ Object



38
39
40
# File 'lib/windows/system_info.rb', line 38

def GetComputerName(buffer, size)
   GetComputerName.call(buffer, size) != 0
end

#GetComputerNameEx(name, buffer, size) ⇒ Object



42
43
44
# File 'lib/windows/system_info.rb', line 42

def GetComputerNameEx(name, buffer, size)
   GetComputerNameEx.call(name, buffer, size) != 0
end

#GetSystemInfo(info) ⇒ Object



46
47
48
# File 'lib/windows/system_info.rb', line 46

def GetSystemInfo(info)
   GetSystemInfo.call(info)
end

#GetUserName(buf, size) ⇒ Object



50
51
52
# File 'lib/windows/system_info.rb', line 50

def GetUserName(buf, size)
   GetUserName.call(buf, size) != 0
end

#GetUserNameEx(format, buf, size) ⇒ Object



54
55
56
# File 'lib/windows/system_info.rb', line 54

def GetUserNameEx(format, buf, size)
   GetUserNameEx.call(format, buf, size) != 0
end

#GetVersionObject



58
59
60
# File 'lib/windows/system_info.rb', line 58

def GetVersion()
   GetVersion.call
end

#GetVersionEx(info) ⇒ Object



62
63
64
# File 'lib/windows/system_info.rb', line 62

def GetVersionEx(info)
   GetVersionEx.call(info) != 0
end

#GetWindowsDirectory(buf, size) ⇒ Object



66
67
68
# File 'lib/windows/system_info.rb', line 66

def GetWindowsDirectory(buf, size)
   GetWindowsDirectory.call(buf, size)
end