require 'Win32API'

=begin
  Message Box:
  Coded by CFC <at> Zuso Security
  CFC <zusocfc@gmail.com>
  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!")
arrow
arrow
    全站熱搜

    hechian 發表在 痞客邦 留言(0) 人氣()