Use Win32API to get a pointer a function : Win32API « Windows Platform « Ruby






Use Win32API to get a pointer a function

require "Win32API"

def system(cmd)
  sys = Win32API.new("crtdll", "system", ['P'], 'L')
  sys.Call(cmd)
end

system("dir")  # cmd /c not needed!

 








Related examples in the same category

1.Read from keyboard
2.Working with Microsoft Windows: open a dialog box:
3.Open a dialog and check the result
4.Get cursor position with Win32API