Mercurial > pub > dyncall > bindings
view ruby/rbdc/examples/win32screenres.rb @ 12:079718588eb6
made erlang binding work with system *installed* dyncall:
- made build use static libraries (used .o files directly)
- removed custom flags for include path and relying on CFLAGS now
- change cc to $(CC)
- readme update with build instructions, etc.
author | cslag |
---|---|
date | Sat, 26 Mar 2016 15:55:50 +0100 |
parents | 5e159be89d73 |
children |
line wrap: on
line source
#////////////////////////////////////////////////////////////////////// # # win32screeninfo.rb # Copyright 2015 Tassilo Philipp # # Dyncall sample loading user32.dll on windows and displaying a # native windows message box by calling MessageBoxA(...). # #/////////////////////////////////////////////////////////////////////// require 'rbdc' l = Dyncall::ExtLib.new if l.load('user32') != nil puts 'width: ' + l.call(:GetSystemMetrics, 'i)i', 0).to_s puts 'height: ' + l.call(:GetSystemMetrics, 'i)i', 1).to_s puts 'number of monitors: ' + l.call(:GetSystemMetrics, 'i)i', 80).to_s end