# Ruby and COM

**URL:** <https://www.ruby-forum.com/t/ruby-and-com/86679>\
**Category:** Ruby\
**Created:** [February 24, 2007, 1:11pm UTC](https://www.ruby-forum.com/t/ruby-and-com/86679 "2007-02-24T13:11:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![11x22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/1/e56c9b/32.png) [@11x22](https://www.ruby-forum.com/u/11x22)\
**Post date:** [February 24, 2007, 1:11pm UTC](https://www.ruby-forum.com/t/ruby-and-com/86679/1 "2007-02-24T13:11:17Z")

</div>

Hmm… Does anyone know of a stable Ruby-COM bridge which will let one do  
things like importing DLLs, querying for interfaces and calling their  
methods? Is there anything stable available out there?

Or at least a possibility to call C++ code from Ruby resolving all this  
CoInitilize(), STA and so on stuff?

---

<div class="post-metadata">

**Author:** ![11x22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/1/e56c9b/32.png) [@11x22](https://www.ruby-forum.com/u/11x22)\
**Post date:** [February 24, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/ruby-and-com/86679/2 "2007-02-24T14:20:30Z")

</div>

On 24.02.2007 13:09, 11x22 wrote:

> Hmm… Does anyone know of a stable Ruby-COM bridge which will let one do  
> things like importing DLLs, querying for interfaces and calling their  
> methods? Is there anything stable available out there?
> 
> Or at least a possibility to call C++ code from Ruby resolving all this  
> CoInitilize(), STA and so on stuff?

There are some libs:  
[http://raa.ruby-lang.org/cat.rhtml?category\_major=Library;category\_minor=Win32](http://raa.ruby-lang.org/cat.rhtml?category_major=Library;category_minor=Win32)

See also  
[http://www.google.com/search?q=ruby+win32](http://www.google.com/search?q=ruby+win32)

I haven’t used any of those but you can find examples by searching the  
archives of this newsgroup / mailing list.

Kind regards

robert

---

<div class="post-metadata">

**Author:** ![11x22](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/1/e56c9b/32.png) [@11x22](https://www.ruby-forum.com/u/11x22)\
**Post date:** [February 25, 2007, 3:21am UTC](https://www.ruby-forum.com/t/ruby-and-com/86679/3 "2007-02-25T03:21:53Z")

</div>

On 2/24/07, Robert K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 24.02.2007 13:09, 11x22 wrote:
> 
> > Hmm… Does anyone know of a stable Ruby-COM bridge which will let one do  
> > things like importing DLLs, querying for interfaces and calling their  
> > methods? Is there anything stable available out there?

For just DLL, look no further than DL (in the standard library), for  
OLE (a COM ancestor), check out Win32OLE (also in the standard  
library). I have used both in the past.

Good luck  
pth
