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.
on 2006-02-09 00:34
on 2006-02-09 05:18
On 2/8/06, Tim U. <firstname.lastname@example.org> 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.)
on 2006-02-09 08:32
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.
on 2006-02-09 09:29
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
on 2006-02-09 09:52
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.
on 2006-02-09 16:28
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'.
on 2006-02-10 02:03
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.
on 2006-02-10 02:17
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
on 2006-02-16 04:41
Unfortunately I need to old style activex components. How mature is the netRuby project anyway?
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?
on 2006-02-16 06:20
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.