# IoOps fix

**URL:** <https://www.ruby-forum.com/t/ioops-fix/176667>\
**Category:** IronRuby\
**Created:** [October 4, 2009, 1:28pm UTC](https://www.ruby-forum.com/t/ioops-fix/176667 "2009-10-04T13:28:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![barby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@barby](https://www.ruby-forum.com/u/barby)\
**Post date:** [October 4, 2009, 1:28pm UTC](https://www.ruby-forum.com/t/ioops-fix/176667/1 "2009-10-04T13:28:33Z")

</div>

Hi

I’ve attached a diff with the same content as the link below. It  
contains  
the code needed to fix detecting console redirection.  
[http://github.com/casualjim/ironruby/commit/b91e0b912d32c908a9021c738ed23a1635044fd4](http://github.com/casualjim/ironruby/commit/b91e0b912d32c908a9021c738ed23a1635044fd4)

I’ve also looked for more places that have p/invoke stuff

/\* the first 2 got fixed in this commit \*/  
/Users/ivan/src/ironruby.mine/Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Builtins/IoOps.cs  
(523, 10): [DllImport(“kernel32”)]  
/Users/ivan/src/ironruby.mine/Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Builtins/IoOps.cs  
(526, 10): [DllImport(“kernel32”)]

/\* probably no need to fix this one Win32API \*/  
/Users/ivan/src/ironruby.mine/Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Win32API/Win32API.cs  
(151, 10): [DllImport(“kernel32.dll”)]  
/Users/ivan/src/ironruby.mine/Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Win32API/Win32API.cs  
(154, 10): [DllImport(“kernel32.dll”)]

/\* Will ask mono people if this is supposed to work on mono \*/  
/Users/ivan/src/ironruby.mine/Merlin/Main/Runtime/Microsoft.Dynamic/ComInterop/ComRuntimeHelpers.cs  
(250, 10): [DllImport(“oleaut32.dll”, PreserveSig = false)]  
/Users/ivan/src/ironruby.mine/Merlin/Main/Runtime/Microsoft.Dynamic/ComInterop/ComRuntimeHelpers.cs  
(256, 10): [DllImport(“oleaut32.dll”, PreserveSig = false)]  
/Users/ivan/src/ironruby.mine/Merlin/Main/Runtime/Microsoft.Dynamic/ComInterop/ComRuntimeHelpers.cs  
(731, 10): [DllImport(“oleaut32.dll”, PreserveSig = false)]

* * *

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