Author Topic: How OS/2 determines which VM to use  (Read 2837 times)

John

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
How OS/2 determines which VM to use
« on: September 06, 2020, 12:03:38 am »
I've been playing around with Odin lately, and noticed that while DOS applications open in a DOS window and OS/2 apps open in their respective windows, Windows applications always open with The Windows 3.1 VM. This is fine for when the EXE really is Win16, but is kind of annoying for Win32 applications, as it won't work (perhaps some Win32s would).

I assume OS/2 determines which VM to use based on the file header. Is this configurable? Could it be changed to run ODIN/Wine/Whatever when it sees a Win32 EXE?
AS/400 Hobbyist

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4805
  • Karma: +99/-1
    • View Profile
Re: How OS/2 determines which VM to use
« Reply #1 on: September 06, 2020, 12:50:16 am »
At one point Odin came with win32k.sys (renamed to xx32.sys IIRC), which amongst other things, implemented what you're talking about. Click a Win32 binary and it ran. This even allowed the browser to launch malware just like real Windows, which is why it was depreciated and now I believe dropped.
There was also pe2lx.exe, renamed later to xx2lx.exe which will convert a PE (Win32) file to LX (OS/2) file, exes and dlls IIRC. That was a better route.
There are old versions of Odin around that have these programs. In some ways they were better for running programs too. Development of Odin for quite a while has more concentrated on stuff like compiling Windows code to run natively. Java, the Flash Wrapper, Acrobat etc.