Win32api

hello

does this mean i dont have the WIN32API

irb(main):008:0> require 'win32api'
LoadError: 127: The specified procedure could not be found. -
Init_win32api
C:/ruby/lib/ruby/1.8/i386-mswin32/win32api.so
  from C:/ruby/lib/ruby/1.8/i386-mswin32/win32api.so
  from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
  from (irb):8

how do i get that or use it in a program?

···

from :0

--
Posted via http://www.ruby-forum.com/.

corey konrad wrote:

hello

does this mean i dont have the WIN32API

irb(main):008:0> require 'win32api'

Try require 'Win32API'

Regards,

Dan

oh ok thanks thats right because Win32API is a class so it has to be
capatalized, kind of jumping ahead of myself there but i was just
curious.

Thanks

Daniel Berger wrote:

···

corey konrad wrote:

hello

does this mean i dont have the WIN32API

irb(main):008:0> require 'win32api'

Try require 'Win32API'

Regards,

Dan

--
Posted via http://www.ruby-forum.com/.

corey konrad wrote:

oh ok thanks thats right because Win32API is a class so it has to be
capatalized, kind of jumping ahead of myself there but i was just
curious.

No, it's not a class, it's a required file. The case has to match method
name Init_...

irb(main):001:0> require 'wIn32ApI'
LoadError: 127: The specified procedure could not be found. -
Init_wIn32ApI

Most libraries use all lowercase. Another one that trips people up is
"RMagick". "Win32API" is the only one with uppercase letters in the
standard library, as you can see from the list at
http://www.ruby-doc.org/stdlib/

Cheers,
Dave

oh ok thanks for the info, i jus started ruby like a week ago, but
playing around with th e wind32api or doing shell stuff in linux are
probably he first thing i am going to do to get more comfortable with
programming. I think that it would make sence to play around with as
many classes and methods as i can first before writing my own. Do you
think that is a good plan?

Dave Burt wrote:

···

corey konrad wrote:

oh ok thanks thats right because Win32API is a class so it has to be
capatalized, kind of jumping ahead of myself there but i was just
curious.

No, it's not a class, it's a required file. The case has to match method
name Init_...

irb(main):001:0> require 'wIn32ApI'
LoadError: 127: The specified procedure could not be found. -
Init_wIn32ApI

Most libraries use all lowercase. Another one that trips people up is
"RMagick". "Win32API" is the only one with uppercase letters in the
standard library, as you can see from the list at
http://www.ruby-doc.org/stdlib/

Cheers,
Dave

--
Posted via http://www.ruby-forum.com/.

corey konrad wrote:

oh ok thanks for the info, i jus started ruby like a week ago, but
playing around with th e wind32api or doing shell stuff in linux are
probably he first thing i am going to do to get more comfortable with
programming. I think that it would make sence to play around with as
many classes and methods as i can first before writing my own. Do you
think that is a good plan?

Not really. It's not a bad idea, but it's just so easy making classes in
Ruby, so you might be able to just jump straight into it.

Chapters 11-17 of Matz' Ruby User's Guide might be of some help with the
concepts involved.
http://www.ruby-doc.org/docs/UsersGuide/rg/

Cheers,
Dave