0.0
The project is in a healthy, maintained state
A WIN32OLE for Windows written in pure Ruby on top of Fiddle instead of a C extension, so that it also runs on JRuby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 1.0
 Project Readme

win32ole-ffi

WIN32OLE implemented in pure Ruby with Fiddle, without a C extension, so that it also runs on JRuby. It works on Windows only, and is tested with CRuby 2.6+ (mswin and mingw) and JRuby 9.4+.

It provides the same API as ruby/win32ole (WIN32OLE, WIN32OLE::Type, WIN32OLE::Event, ...) and runs that gem's test suite. Use one or the other: both define the WIN32OLE class, so do not load win32ole and win32ole/ffi in the same process.

Installation

gem 'win32ole-ffi'

The gem depends on the fiddle gem on CRuby and on the ffi gem (which JRuby's Fiddle runs on) on JRuby.

Usage

Require win32ole/ffi where you would require win32ole:

require 'win32ole/ffi'

dict = WIN32OLE.new('Scripting.Dictionary')
dict.add('ruby', 'Ruby')
dict.item('ruby') #=> "Ruby"

WIN32OLE::Property, the helper that ruby/win32ole's olegen.rb-generated code uses, is not included.

Development

$ git clone --recurse-submodules https://github.com/eitoball/win32ole-ffi
$ bundle install
$ bundle exec rake test

rake test also runs ruby/win32ole's tests from the vendor/win32ole submodule. Before that it applies patches/*.patch to the submodule's working tree; rake test:unpatch reverts them.

License

The same as ruby/win32ole: Ruby's license or BSD-2-Clause (see COPYING and BSDL).