Have a look at Win32API
stdlib. It's a fairly easy (but arcane) interface to the Windows 32 API, or DLLs.
Documentation is here, some examples here. To give you a taste:
require "Win32API"
def get_computer_name
name = " " * 128
size = "128"
Win32API.new('kernel32', 'GetComputerName', ['P', 'P'], 'I').call(name, size)
name.unpack("A*")
end
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…