AFAIK, GetStdHandle will answer NULL, as explained here:
(Windows is not my speciality, so I can be wrong… but AFAIK, Eliot also had to produce two executables for windows, because of this reason)
Esteban
Esteban wrote:
you cannot.
and the reason is deeply inside the inners of the vm implementation and the windows architecture
not true as to my knowledge even a windows app can get a handle to stdout (or set one) and this is not
dependent if you build it as consol or ui app. you can even create own consoles if you like, ...
If I remember correctly from ST/MT and MSDN getting a handle to stdio means only to call "GetStdHandle"
with STD_OUTPUT_HANDLE.
So the basic reason is that stdout support was not implemented for Windows because it is different
than Unix flavours and nobody seemed to care so far. Therefore Pharo on Windows uses a workaround (file)
instead of completing the handling for Windows. Maybe it was the lack of time or knowledge or that NB was not
ready yet. Dont know.
I already have some initial support for consoles and reading/writing to it in the OSWindows project
that could be loaded from config browser. This could be a base.
So it is possible but as ever ... time and resources.
Bye
T.