Forum: Ruby on Rails Writing activex controls and dlls in ruby.

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C0cb3aadb9a66d00df16686f4a1fc312?d=identicon&s=25 Tim Uckun (Guest)
on 2006-02-08 23:34
(Received via mailing list)
Is it possible to write activex controls and windows DLLs in ruby? I
would like to have some of my logic be usable from VB (don't ask why).

25e11a00a89683f7e01e425a1a6e305c?d=identicon&s=25 Wilson Bilkovich (Guest)
on 2006-02-09 04:18
(Received via mailing list)
On 2/8/06, Tim Uckun <> wrote:
> Is it possible to write activex controls and windows DLLs in ruby? I
> would like to have some of my logic be usable from VB (don't ask why).
> Thanks.

Good question; I need to figure this out myself in the coming weeks.
(Oddly, I have the reverse of the problem I expected.. I've got
something written in Ruby that VB/COM people need to connect to. Heh.)
C0cb3aadb9a66d00df16686f4a1fc312?d=identicon&s=25 Tim Uckun (Guest)
on 2006-02-09 07:32
(Received via mailing list)
We have the same problem Some ruby code that I want called from VB.
Judging by the lack of an answer and a dearth of information from
google I don't think this is possible.

Too bad. I might have to try and translate my code to python or god
forbid VB. I know it's possible in python.
4005a47a8f2ceee49670b920593c1d52?d=identicon&s=25 Ben Munat (Guest)
on 2006-02-09 08:29
(Received via mailing list)
I don't know anything about programming windows activex controls, but I
do know there's a
chapter on talking to windows from ruby in the pickaxe book. The chapter
looks to be
shorter in the online version:

than in the second edition on paper. Hmm, well they both say this:

"If you plan on doing Ruby programming that needs to access some Windows
32 API functions
directly, or to use the entry points in some other DLLs, we've got good
news for you---the
Win32API extension."

But the paper book has a code example shortly after that and the online
version doesn't.
Well, anyway you should check that library out and see if it does what
you need:

6fb7896e1c27e7f15bf335987a37b217?d=identicon&s=25 Aneesha Bakharia (Guest)
on 2006-02-09 08:52
(Received via mailing list)

So if Java was write once run everywhere then .NET is write in any
run just on Windows and sometimes on Mono.
My point is the there are many languages for .NET including a NetRuby
interpreter and Ruby/.NET Bridge.
Check out:
Not quite the old windows activex controls but a way to interface to
25e11a00a89683f7e01e425a1a6e305c?d=identicon&s=25 Wilson Bilkovich (Guest)
on 2006-02-09 15:28
(Received via mailing list)
I seriously doubt that it's impossible. I just don't know how to do it
Ruby lets you make arbitrary calls to Win32 or OLE/COM.  Worst-case,
you'd just have to make the marshalling calls 'by hand'.
C0cb3aadb9a66d00df16686f4a1fc312?d=identicon&s=25 Tim Uckun (Guest)
on 2006-02-10 01:03
(Received via mailing list)
That chapter talks about using activex controls from ruby and making
calls into DLLs from ruby. I need the opposite. I need to package up
ruby code as an activex control.

In python there is a program called py2exe which allows you to bundle
your pyton application and make it into an executable, windows
service, or a windows COM object. RubyScript2Exe only makes an
executable but is unable to make a COM object or a windows server.
4005a47a8f2ceee49670b920593c1d52?d=identicon&s=25 Ben Munat (Guest)
on 2006-02-10 01:17
(Received via mailing list)
Er, yeah... I think I was answering a different guy who wanted the

Hey, I wonder if there's anyone working on ruby for the CLR... er, I
should shut up cuz I
don't even know if that would help you either...

C0cb3aadb9a66d00df16686f4a1fc312?d=identicon&s=25 Tim Uckun (Guest)
on 2006-02-16 03:41
(Received via mailing list)
Unfortunately I need to old style activex components. How mature is
the netRuby project anyway?
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2006-02-16 04:36
I know we all love Ruby but the COM interfaces for an activex control
are relatively complicated. This is a perfect thing for a framework to
handle and Microsoft's does. Yeah, you have to pay for VS, but the cost
of manually implementing each interface is probably quite a bit higher
-- especially if you include testing.

I really recommend you roll up your C# sleeves and use the MS tools if
activex is what you need.

Tim Uckun wrote:
> Unfortunately I need to old style activex components. How mature is
> the netRuby project anyway?
455ac2a64d06dc8461f4d258d7f7e980?d=identicon&s=25 Michael Trier (Guest)
on 2006-02-16 05:20
(Received via mailing list)
For the Ruby to .NET folks, I highly recommend John Lam's bridge
(  He's made great progress on it.

Michael Trier
This topic is locked and can not be replied to.