Its trivial to implement "launch32". Just use AppDomain.ExecuteAssembly (http://msdn.microsoft.com/en-us/library/system.appdomain.executeassembly.aspx) to launch ir.exe in the same process. Now the launch32.exe wrapper program needs to be compiled using /platform:x86. The bitness of the process will be determined by the bitness of launch32.exe, not any exes it launches in-process using ExecuteAssembly.
That said, it *will* be useful to include platform-specific versions of ir.exe in the release. F# does this, and IronPython has recently started doing this. The main reason to do this is that startup is very slow on 64-bit machines. See http://stackoverflow.com/questions/1015076/why-is-ironpython-startup-time-so-slow. So having ir.exe be a 32-bit executable prevents people from naively hitting the slow startup, while including ir64.exe still enables the folks who need 64-bit processes (mainly because they are manipulating large data sets and need more than 2^32 address space) Thanks, Shri -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Robert Brotherus Sent: Monday, July 13, 2009 3:02 AM To: [email protected] Subject: [Ironruby-core] Accessing 32-bit native DLL:s when running IR on Vista64 We are building IronRuby top-layer on a legacy application that consist, in part, of Windows 32-bit native dll:s. These native DLL:s are accessed by C# code via P/Invoke and our IronRuby code subsequently calls the C# code. We start our app by running: ie.exe main.rb Things are going fine on Windows XP/Vista 32-bit. On 64-bit Vista, the native DLL:s fail to load and application execution fails. This is because 64-bit Vista uses by default 64-bit version of MS.NET framework (in c:\Windows\Microsoft.NET\Framework64). This executes in a 64-bit process that cannot load 32-bit dll:s. Vista64 has also 32-bit version of ms.net (in c:\Windows\Microsoft.NET\Framework). When our app is run with this version of the framework, it executes fine (loading 32-bit native dll:s) on Vista64. However, the only way we have found out to run a dotnet-exe with the 32-bit dotnet-framework on Vista64 is to compile the dotnet-exe with having "Platfowm target"-setting to be "x86" instead of the default "Any CPU". This means that currenlty we are forced to use our own compilation of ir.exe instead of working with the out-of-the-box ironruby-installations at http://www.ironruby.net/Download. Is there a way to start a dotnet-exe that has been built with "Any CPU" setting explicitly with 32-bit version of dotnet framework? Something like: c:\work> launch32 ir.exe main.rb If no, would it make sense for ir installation packages to contain out-of-the-box three versions of the main exe: ie.exe (Any CPU), ir32.exe and ir64.exe ? Robert Brotherus Napa Inc. _______________________________________________ Ironruby-core mailing list [email protected] http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list [email protected] http://rubyforge.org/mailman/listinfo/ironruby-core
