Method: NPGRT::Win32API#addressof

Defined in:
lib/npgrt/win32api.rb

#addressof(dll, func) ⇒ Object



49
50
51
52
53
# File 'lib/npgrt/win32api.rb', line 49

def addressof(dll, func)
  dl = api('kernel32', 'GetModuleHandle').call(dll) 
  dl = (dl == 0) ? dl : api('kernel32', 'LoadLibrary').call(dll) 
  api('kernel32', 'GetProcAddress').call dl, func
end