Module: Windows

Extended by:
FFI::Library
Defined in:
lib/net/ping/helper.rb

Class Method Summary collapse

Class Method Details

.HIBYTE(w) ⇒ Object



27
28
29
# File 'lib/net/ping/helper.rb', line 27

def HIBYTE(w)
  w >> 8
end

.LOBYTE(w) ⇒ Object



23
24
25
# File 'lib/net/ping/helper.rb', line 23

def LOBYTE(w)
  w & 0xff
end

.LOWORD(l) ⇒ Object



19
20
21
# File 'lib/net/ping/helper.rb', line 19

def LOWORD(l)
  l & 0xffff
end

.versionObject



9
10
11
12
13
14
# File 'lib/net/ping/helper.rb', line 9

def version
  version = GetVersion()
  major = LOBYTE(LOWORD(version))
  minor = HIBYTE(LOWORD(version))
  eval("Float(#{major}.#{minor})")
end