[Vm-dev] UI VM vs. Consol VM on Windows

David T. Lewis lewis at mail.msen.com
Fri Mar 10 17:43:23 UTC 2017

If I understand what Ben is saying about opening a console window, then
"OSProcess thisOSProcess openConsole" might be doing what you want,
implemented with <primitive: 'primitiveAllocConsole' module:

I don't know if it still works though, I have not checked it recently.


> On Fri, Mar 10, 2017 at 10:49 PM, Torsten Bergmann <astares at gmx.de> wrote:
>> Hi,
>> for the virtual machine on Windows we have a UI VM and a headless
>> console version. For instance "Squeak.exe"/"Pharo.exe"/... (UI VM) and
>> "SqueakConsole.exe"/"PharoConsole.exe"/... (Console version to access
>> stdin, stdout and stderr)
>> IMHO there is no need for a separate and special console version on
>> Windows. Maybe it was the easiest/quickest way to implement this
>> but usually one should be able to access/create and redirect the std
>> handles even in a UI application. See
>> http://dslweb.nwnexus.com/~ast/dload/guicon.htm
> As I understand that article, to get stdio from a GUI app you'll be
> popping up that awful black window on screen...
> "its possible for your GUI application to
> explicitly create a  **console window**
> and then manually associate standard C I/O handles (FILE*) with the
> appropriate Win32 handles"
> The following dance might be more what you're looking for...
> "How to make an application as both GUI and Console application?"
> https://blogs.msdn.microsoft.com/junfeng/2004/02/06/how-to-make-an-application-as-both-gui-and-console-application/
> btw, I found these interesting...
> "What’s the difference between the COM and EXE extensions?"
> https://blogs.msdn.microsoft.com/oldnewthing/20080324-00/?p=23033
> "Difference between .com program and .exe program in c programming
> language"
> http://www.cquestions.com/2011/02/difference-between-com-program-and-exe.html
> cheers -ben
>> for a start. Maybe it is possible to get rid of a separate
>> "XXXConsole.exe" version so the VM on Windows behaves like on other
>> platforms.
>> Maybe that als unifies/eases the build.
>> Side note:
>> Maybe there is also a difference when you start an executable with
>> Explorer (double click) where you might need to create a new console vs.
>> starting the executable from an already existing console command line
>> (where it might be possible to catch an existing handle). But this
>> could be evaluated with a simple C executable and (if working)
>> transformed to the Open Smalltalk virtual machine.
>> Bye
>> T.

More information about the Vm-dev mailing list