Last active
December 15, 2015 21:09
-
-
Save pragdave/5323282 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fiddle' | |
include Fiddle | |
user32 = DL.dlopen("user32.dll") | |
msgbox = Fiddle::Function.new(user32['MessageBoxA'], | |
[TYPE_LONG, TYPE_VOIDP, TYPE_VOIDP, TYPE_INT], | |
TYPE_INT) | |
MB_OKCANCEL = 1 | |
msgbox.call(0, "OK?", "Please Confirm", MB_OKCANCEL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment