# Problems with win32ole.so

**URL:** <https://www.ruby-forum.com/t/problems-with-win32ole-so/167483>\
**Category:** IronRuby\
**Created:** [May 8, 2009, 9:35am UTC](https://www.ruby-forum.com/t/problems-with-win32ole-so/167483 "2009-05-08T09:35:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abuyaseen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb9ed0/32.png) [@abuyaseen](https://www.ruby-forum.com/u/abuyaseen)\
**Post date:** [May 8, 2009, 9:35am UTC](https://www.ruby-forum.com/t/problems-with-win32ole-so/167483/1 "2009-05-08T09:35:47Z")

</div>

Hi all,

I hope this is the right forum to ask following question.

I am testing IronRuby 0.3 and trying to use ruby(ruby 1.8.7 (2008-08-11  
patchlevel 72) [i386-mswin32]) application which works fine on my XP  
machine. I have given correct paths to IronRuby but I get (The module  
was expected to contain an assembly manifest. (Exception from HRESULT:  
0x80131018)) error when IronRuby try to load assembly.

Here is code how I have initialized runtime:

```
  ScriptRuntimeSetup setup = new ScriptRuntimeSetup();
        setup.LanguageSetups.Add(
            new LanguageSetup(
                typeof(RubyContext).AssemblyQualifiedName,
                "IronRuby",
                new[] { "IronRuby" },
                new[] { ".rb" }
            ));
        ScriptRuntime runtime = new ScriptRuntime(setup);
        ScriptEngine engine = Ruby.CreateEngine();
        List<string> paths = new List<string>();

        paths.Add(@"C:\ironruby\Merlin\Main\Languages\Ruby\Libs");
        paths.Add(@"C:\ruby\lib\ruby\1.8");
        paths.Add(@"C:\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\site_ruby\1.8");
        paths.Add(@"C:\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p287\lib\ruby\1.8\i386-mswin32");

        engine.SetSearchPaths(paths);
        engine.ExecuteFile(@"C:\test.rb");

```

So am I trying do something which is currently impossible with current  
IronRuby implementation or did I do somekind of configuration mistake?

---

<div class="post-metadata">

**Author:** ![abuyaseen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb9ed0/32.png) [@abuyaseen](https://www.ruby-forum.com/u/abuyaseen)\
**Post date:** [May 8, 2009, 10:05am UTC](https://www.ruby-forum.com/t/problems-with-win32ole-so/167483/2 "2009-05-08T10:05:50Z")

</div>

You can use ironruby-dbi to access databases.  
Or you can use the [ADO.NET](http://ADO.NET) interfaces directly.

## win32ole relies on C-extensions and they don’t work on IronRuby If your application depends on C-extensions they need to be ported to C#.

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([http://manning.com/carrero](http://manning.com/carrero))

## Ogden Nash [http://www.brainyquote.com/quotes/authors/o/ogden\_nash.html](http://www.brainyquote.com/quotes/authors/o/ogden_nash.html)

“The trouble with a kitten is that when it grows up, it’s always a cat.”

---

<div class="post-metadata">

**Author:** ![abuyaseen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb9ed0/32.png) [@abuyaseen](https://www.ruby-forum.com/u/abuyaseen)\
**Post date:** [May 8, 2009, 10:12am UTC](https://www.ruby-forum.com/t/problems-with-win32ole-so/167483/3 "2009-05-08T10:12:51Z")

</div>

Thanks for your quick answer.

In my case this means porting to C#.

Br,  
Sami

---

<div class="post-metadata">

**Author:** ![abuyaseen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb9ed0/32.png) [@abuyaseen](https://www.ruby-forum.com/u/abuyaseen)\
**Post date:** [May 11, 2009, 10:42am UTC](https://www.ruby-forum.com/t/problems-with-win32ole-so/167483/4 "2009-05-11T10:42:51Z")

</div>

Mainly there is application handling through command prompt  
(ShellExecute). I should first study more those interop features and of  
course Ruby too cause both are quite new things for me.

Sami

---

<div class="post-metadata">

**Author:** ![abuyaseen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb9ed0/32.png) [@abuyaseen](https://www.ruby-forum.com/u/abuyaseen)\
**Post date:** [May 8, 2009, 6:27pm UTC](https://www.ruby-forum.com/t/problems-with-win32ole-so/167483/5 "2009-05-08T18:27:13Z")

</div>

What methods and modules do you use from Win32OLE? It might be actually  
easy to implement them in Ruby using our .NET and COM interop features.

Tomas
