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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tim U. (Guest)
on 2006-02-09 00: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).

Thanks.
Wilson B. (Guest)
on 2006-02-09 05:18
(Received via mailing list)
On 2/8/06, Tim U. <removed_email_address@domain.invalid> 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.)
Tim U. (Guest)
on 2006-02-09 08: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.
Ben M. (Guest)
on 2006-02-09 09: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:

http://www.rubycentral.com/book/win32.html

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:

http://stdlib.rubyonrails.org/libdoc/Win32API/rdoc...

b
Aneesha Bakharia (Guest)
on 2006-02-09 09:52
(Received via mailing list)
Howdy

So if Java was write once run everywhere then .NET is write in any
language
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: http://www.gotdotnet.com/team/lang/
Not quite the old windows activex controls but a way to interface to
windows.
Wilson B. (Guest)
on 2006-02-09 16:28
(Received via mailing list)
I seriously doubt that it's impossible. I just don't know how to do it
yet.
Ruby lets you make arbitrary calls to Win32 or OLE/COM.  Worst-case,
you'd just have to make the marshalling calls 'by hand'.
Tim U. (Guest)
on 2006-02-10 02: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.
Ben M. (Guest)
on 2006-02-10 02:17
(Received via mailing list)
Er, yeah... I think I was answering a different guy who wanted the
former...

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...

b
Tim U. (Guest)
on 2006-02-16 04:41
(Received via mailing list)
Unfortunately I need to old style activex components. How mature is
the netRuby project anyway?
Steve R. (Guest)
on 2006-02-16 05: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 U. wrote:
> Unfortunately I need to old style activex components. How mature is
> the netRuby project anyway?
Michael T. (Guest)
on 2006-02-16 06:20
(Received via mailing list)
For the Ruby to .NET folks, I highly recommend John L.'s bridge
(www.iunknown.com).  He's made great progress on it.

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