module WinFFI

Constants

Architecture
HANDLE
LOGGER
MAX_PATH
SetLastErrorExCode

SetLastErrorEx() types.

VERSION
WindowsVersion

Public Class Methods

HIBYTE(w) click to toggle source

define HIBYTE(w) ((BYTE)((((DWORD_PTR)(w)) >> 8) & 0xff))

# File lib/win-ffi/core/macro/util.rb, line 38
def HIBYTE(w)
  w >> 8
end
HIWORD(l) click to toggle source

define HIWORD(_dw) ((WORD)((((DWORD_PTR)(_dw)) >> 16) & 0xffff))

# File lib/win-ffi/core/macro/util.rb, line 24
def HIWORD(l)
  l >> 16
end
HandleToLong(h) click to toggle source

define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )

# File lib/win-ffi/core/macro/util.rb, line 48
def HandleToLong(h)
  h.address
end
HandleToULong(h) click to toggle source

define HandleToULong( h ) ((ULONG)(ULONG_PTR)(h) )

# File lib/win-ffi/core/macro/util.rb, line 43
def HandleToULong(h)
  h.address
end
LOBYTE(w) click to toggle source

define LOBYTE(w) ((BYTE)(((DWORD_PTR)(w)) & 0xff))

# File lib/win-ffi/core/macro/util.rb, line 33
def LOBYTE(w)
  w & 0xff
end
LOWORD(l) click to toggle source

define LOWORD(_dw) ((WORD)(((DWORD_PTR)(_dw)) & 0xffff))

# File lib/win-ffi/core/macro/util.rb, line 19
def LOWORD(l)
  l & 0xffff
end
LongToHandle(h) click to toggle source

define LongToHandle( h ) ((HANDLE)(LONG_PTR) (h) )

# File lib/win-ffi/core/macro/util.rb, line 58
def LongToHandle(h)
  FFI::Pointer.new(HANDLE, h)
end
MAKELCID(lgid, srtid) click to toggle source
# File lib/win-ffi/core/macro/util.rb, line 14
def MAKELCID(lgid, srtid) # ulong
  srtid << 16 | lgid
end
MAKELONG(a, b) click to toggle source
# File lib/win-ffi/core/macro/util.rb, line 10
def MAKELONG(a, b)
  ((a & 0xffff) | ((b & 0xffff) << 16))
end
MAKEWORD(a, b) click to toggle source
# File lib/win-ffi/core/macro/util.rb, line 6
def MAKEWORD(a, b)
  ((a & 0xff) | ((b & 0xff) << 8))
end
ULongToHandle(ul) click to toggle source

define ULongToHandle( ul ) ((HANDLE)(ULONG_PTR) (ul) )

# File lib/win-ffi/core/macro/util.rb, line 53
def ULongToHandle(ul)
  FFI::Pointer.new(HANDLE, ul)
end
encoding() click to toggle source
# File lib/win-ffi/core/lib_base.rb, line 9
def self.encoding
  @encoding
end
encoding=(encoding) click to toggle source
# File lib/win-ffi/core/lib_base.rb, line 13
def self.encoding=(encoding)
  @encoding = encoding
end