require 'ffi'

module Jydisk
    extend FFI::Library
ffi_lib File.join(File.expand_path('..', __FILE__),'jydisk.dll')
attach_function :getDiskSerialNumber1,[:char,:string,:pointer,:bool],:void
end
sresult='*'*100
buf = FFI::Buffer.new :int
dsn=Jydisk.getDiskSerialNumber1('c'.unpack('c')[0],sresult,buf,false)
puts sresult.gsub('*','')
 



module Jydisk
    extend FFI::Library
ffi_lib File.join(File.expand_path('..', __FILE__),'jydisk.dll')
attach_function :init,[],:void
end


module Jydisk
    extend FFI::Library
ffi_lib File.join(File.expand_path('..', __FILE__),'jydisk.dll')
attach_function :doReg,[[:string,:int,:string,:int],:void
end