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 2/8/06, Tim Uckun <timuckun@gmail.com> 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.)
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 2/9/06, Wilson Bilkovich <wilsonb@gmail.com> wrote:> On 2/8/06, Tim Uckun <timuckun@gmail.com> 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.) > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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/index.html b Tim Uckun wrote:> 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 2/9/06, Wilson Bilkovich <wilsonb@gmail.com> wrote: > >>On 2/8/06, Tim Uckun <timuckun@gmail.com> 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.) >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails
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. -- Aneesha -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060209/bcda78d9/attachment.html
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 2/9/06, Tim Uckun <timuckun@gmail.com> wrote:> 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 2/9/06, Wilson Bilkovich <wilsonb@gmail.com> wrote: > > On 2/8/06, Tim Uckun <timuckun@gmail.com> 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.) > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
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 2/9/06, Ben Munat <bent@munat.com> wrote:> 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/index.html > > b > > > Tim Uckun wrote: > > 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 2/9/06, Wilson Bilkovich <wilsonb@gmail.com> wrote: > > > >>On 2/8/06, Tim Uckun <timuckun@gmail.com> 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.) > >>_______________________________________________ > >>Rails mailing list > >>Rails@lists.rubyonrails.org > >>http://lists.rubyonrails.org/mailman/listinfo/rails > >> > >> > >> > >>------------------------------------------------------------------------ > >> > >>_______________________________________________ > >>Rails mailing list > >>Rails@lists.rubyonrails.org > >>http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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 Uckun wrote:> 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 2/9/06, Ben Munat <bent@munat.com> wrote: > >>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/index.html >> >>b >> >> >>Tim Uckun wrote: >> >>>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 2/9/06, Wilson Bilkovich <wilsonb@gmail.com> wrote: >>> >>> >>>>On 2/8/06, Tim Uckun <timuckun@gmail.com> 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.) >>>>_______________________________________________ >>>>Rails mailing list >>>>Rails@lists.rubyonrails.org >>>>http://lists.rubyonrails.org/mailman/listinfo/rails >>>> >>>> >>>> >>>>------------------------------------------------------------------------ >>>> >>>>_______________________________________________ >>>>Rails mailing list >>>>Rails@lists.rubyonrails.org >>>>http://lists.rubyonrails.org/mailman/listinfo/rails >> >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails
Unfortunately I need to old style activex components. How mature is the netRuby project anyway? On 2/9/06, Aneesha Bakharia <aneesha.bakharia@gmail.com> wrote:> 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. > > > -- > Aneesha > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
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?-- Posted via http://www.ruby-forum.com/.