summaryrefslogtreecommitdiff
path: root/ext/win32/lib
diff options
context:
space:
mode:
-rw-r--r--ext/win32/lib/Win32API.rb8
-rw-r--r--ext/win32/lib/win32/resolv.rb2
2 files changed, 8 insertions, 2 deletions
@@ -12,7 +12,13 @@ class Win32API
def initialize(dllname, func, import, export = "0", calltype = :stdcall)
@proto = [import].join.tr("VPpNnLlIi", "0SSI").sub(/^(.)0*$/, '\1')
- handle = DLL[dllname] ||= Fiddle.dlopen(dllname)
@func = Fiddle::Function.new(
handle[func],
@@ -38,7 +38,7 @@ module Win32
nt = Module.new do
break true if [nil].pack("p").size > 4
extend Importer
- dlload "kernel32"
getv = extern "int GetVersionExA(void *)", :stdcall
info = [ 148, 0, 0, 0, 0 ].pack('V5') + "\0" * 128
getv.call(info)