Windows API's

A

Andrew Falanga

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?
 
D

Dave Burt

Andrew Falanga said:
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:
http://rubygarden.org/ruby?ScriptingExcel

HTH,
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,500
Latest member
ArianneJsb

Latest Threads

Top