Win32API Sample: MessageBox

require 'Win32API'

=begin
Message Box:
Coded by CFC <at> Zuso Security
CFC <[email protected]>
2007/2/16
=end

class Msgbox
def initialize(lpText="", lpCaption="", wType = 0)
Win32API.new('user32', 'MessageBox', %w(p p p i), 'i').call(0,lpText,lpCaption,wType)
end
end

def Msgbox(lpText="", lpCaption="", wType = 0)
Win32API.new('user32', 'MessageBox', %w(p p p i), 'i').call(0,lpText,lpCaption,wType)
end

採用MIT授權條款
Usage:
Msgbox.new("Hi", "Hello, world")
Msgbox.new("XD", "Hello!", 1)
Msgbox("Hi", "Hello!")

你可能感兴趣的:(Security,Gmail)