Windows API's

Hi,

Thanks to all for the help with ftp and CRC library question that I had. I decided to start a new thread on this one because I wasn't sure if anyone read the "new" posting at the bottom of the earlier thread "Ruby Libraries".

TCL has a TWAPI interface library, doesn't anything similar exist in Ruby?

···

---------------------------------------------
Andrew R. Falanga (a non-HP employee)
Hewlett-Packard Company
11311 Chinden Blvd.
Boise, Idaho
---------------------------------------------
Please note: The e-mail address is purposely
mangled. I do not wish my account at HP to
become a spam haven.

"Andrew Falanga" <not_real@hp.com> wrote...

TCL has a TWAPI interface library, doesn't anything similar exist in Ruby?

Yes, it does. I don't know what TWAPI looks like, or what you want it for,
but here are some options.

1) There is Win32API in the standard library. Here is a simple example taken
from Pickaxe:

  shell = Win32API.new("shell32","ShellExecute", ['L','P','P','P','P','L'],
'L' )
  shell.Call(0, "print", fname, 0,0, SW_SHOWNORMAL)

Check out the doco at:
http://www.ruby-doc.org/stdlib/libdoc/Win32API/rdoc/

2) The Win32 Utils library is not in the standard library, but provides
Rubyish wrappers to a lot of commonly used Windows functionality.

http://rubyforge.org/projects/win32utils/

3) DL provides more general capability for calling dynamic libraries. It's
also in the standard library, but the documentation is incomplete. Try here:

http://www.jbrowse.com/text/rdl_en.html

4) The standard Win32OLE library provides a neat and easy-to-use COM
interface.
http://www.ruby-doc.org/stdlib/libdoc/win32ole/rdoc/

See some examples of this library in use here:

HTH,
Dave